Update of /cvsroot/emacs-jabber/emacs-jabber
In directory sc8-pr-cvs17:/tmp/cvs-serv23996
Modified Files:
jabber-chat.el
Log Message:
Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-413
Creator: Magnus Henoch <ma...@fr...>
Don't use global variables in jabber-chat-self-prompt
Index: jabber-chat.el
===================================================================
RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-chat.el,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -r1.83 -r1.84
--- jabber-chat.el 15 Sep 2007 11:50:49 -0000 1.83
+++ jabber-chat.el 17 Sep 2007 12:26:07 -0000 1.84
@@ -104,8 +104,8 @@
%t Time, formatted according to `jabber-chat-time-format'
or `jabber-chat-delayed-time-format'
-%n Nickname (`jabber-nickname')
%u Username
+%n Nickname (obsolete, same as username)
%r Resource
%j Bare JID (without resource)"
:type 'string
@@ -476,21 +476,26 @@
If DELAYED is true, print long timestamp
\(`jabber-chat-delayed-time-format' as opposed to
`jabber-chat-time-format')."
- (insert (jabber-propertize
- (format-spec jabber-chat-local-prompt-format
- (list
- (cons ?t (format-time-string
- (if delayed
- jabber-chat-delayed-time-format
- jabber-chat-time-format)
- timestamp))
- (cons ?n jabber-nickname)
- (cons ?u jabber-username)
- (cons ?r jabber-resource)
- (cons ?j (concat jabber-username "@" jabber-server))))
- 'face 'jabber-chat-prompt-local
- 'help-echo
- (concat (format-time-string "On %Y-%m-%d %H:%M:%S" timestamp) " from you"))))
+ (let* ((state-data (fsm-get-state-data jabber-buffer-connection))
+ (username (plist-get state-data :username))
+ (server (plist-get state-data :server))
+ (resource (plist-get state-data :resource))
+ (nickname username))
+ (insert (jabber-propertize
+ (format-spec jabber-chat-local-prompt-format
+ (list
+ (cons ?t (format-time-string
+ (if delayed
+ jabber-chat-delayed-time-format
+ jabber-chat-time-format)
+ timestamp))
+ (cons ?n nickname)
+ (cons ?u username)
+ (cons ?r resource)
+ (cons ?j (concat username "@" server))))
+ 'face 'jabber-chat-prompt-local
+ 'help-echo
+ (concat (format-time-string "On %Y-%m-%d %H:%M:%S" timestamp) " from you")))))
(defun jabber-chat-print-error (xml-data)
"Print error in given <message/> in a readable way."
|