From: Kirill A. K. <ca...@us...> - 2008-11-21 12:52:06
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv7522 Modified Files: AUTHORS jabber-presence.el Log Message: preserve current status when switching between them by Alexander Solovyov Index: jabber-presence.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-presence.el,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- jabber-presence.el 19 Sep 2008 21:07:32 -0000 1.51 +++ jabber-presence.el 21 Nov 2008 12:51:50 -0000 1.52 @@ -395,15 +395,15 @@ (interactive (list (when current-prefix-arg (jabber-read-with-input-method "status message: " *jabber-current-status* '*jabber-status-history*)))) - (jabber-send-presence "away" status *jabber-current-priority*)) + (jabber-send-presence "away" (if status status *jabber-current-status*) *jabber-current-priority*)) (defun jabber-send-xa-presence (&optional status) "Send extended away presence. With prefix argument, ask for status message." (interactive (list - (when current-prefix-arg - (jabber-read-with-input-method "status message: " *jabber-current-status* '*jabber-status-history*)))) - (jabber-send-presence "xa" status *jabber-current-priority*)) + (when current-prefix-arg + (jabber-read-with-input-method "status message: " *jabber-current-status* '*jabber-status-history*)))) + (jabber-send-presence "xa" (if status status *jabber-current-status*) *jabber-current-priority*)) ;;;###autoload (defun jabber-send-default-presence (&optional jc) @@ -413,7 +413,10 @@ (interactive) ;; jc is ignored. It's only there so this function can be in ;; jabber-post-connect-hooks. - (jabber-send-presence jabber-default-show jabber-default-status jabber-default-priority)) + (jabber-send-presence + jabber-default-show + (if (not (string= jabber-default-status "")) jabber-default-status *jabber-current-status*) + jabber-default-priority)) (defun jabber-send-current-presence (&optional jc) "(Re-)send current presence. Index: AUTHORS =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/AUTHORS,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- AUTHORS 19 Sep 2008 18:23:48 -0000 1.17 +++ AUTHORS 21 Nov 2008 12:51:50 -0000 1.18 @@ -22,5 +22,6 @@ Milan Zamazal Xavier Maillard Vitaly Mayatskikh +Alexander Solovyov arch-tag: 15700144-3BD9-11D9-871C-000A95C2FCD0 |