From: Magnus H. <leg...@us...> - 2014-06-11 10:05:35
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "emacs-jabber". The branch, master has been updated via 1ea60b5549345a297309e9087388987dd6fbec89 (commit) from 15ea34d2d8b7e6a83cdcd64a3aac13bb1c8452b7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1ea60b5549345a297309e9087388987dd6fbec89 Author: Magnus Henoch <mag...@gm...> Date: Wed Jun 11 10:19:44 2014 +0100 Initialise chat buffer only once Don't clobber local variables. This is needed for OTR. diff --git a/jabber-chat.el b/jabber-chat.el index d08e913..ab8d2e2 100644 --- a/jabber-chat.el +++ b/jabber-chat.el @@ -226,27 +226,28 @@ Either a string or a buffer is returned, so use `get-buffer' or This function is idempotent." (with-current-buffer (get-buffer-create (jabber-chat-get-buffer chat-with)) (unless (eq major-mode 'jabber-chat-mode) - (jabber-chat-mode jc #'jabber-chat-pp)) + (jabber-chat-mode jc #'jabber-chat-pp) + + (make-local-variable 'jabber-chatting-with) + (setq jabber-chatting-with chat-with) + (setq jabber-send-function 'jabber-chat-send) + (setq header-line-format jabber-chat-header-line-format) + + (make-local-variable 'jabber-chat-earliest-backlog) + + ;; insert backlog + (when (null jabber-chat-earliest-backlog) + (let ((backlog-entries (jabber-history-backlog chat-with))) + (if (null backlog-entries) + (setq jabber-chat-earliest-backlog (jabber-float-time)) + (setq jabber-chat-earliest-backlog + (jabber-float-time (jabber-parse-time + (aref (car backlog-entries) 0)))) + (mapc 'jabber-chat-insert-backlog-entry (nreverse backlog-entries)))))) + ;; Make sure the connection variable is up to date. (setq jabber-buffer-connection jc) - (make-local-variable 'jabber-chatting-with) - (setq jabber-chatting-with chat-with) - (setq jabber-send-function 'jabber-chat-send) - (setq header-line-format jabber-chat-header-line-format) - - (make-local-variable 'jabber-chat-earliest-backlog) - - ;; insert backlog - (when (null jabber-chat-earliest-backlog) - (let ((backlog-entries (jabber-history-backlog chat-with))) - (if (null backlog-entries) - (setq jabber-chat-earliest-backlog (jabber-float-time)) - (setq jabber-chat-earliest-backlog - (jabber-float-time (jabber-parse-time - (aref (car backlog-entries) 0)))) - (mapc 'jabber-chat-insert-backlog-entry (nreverse backlog-entries))))) - (current-buffer))) (defun jabber-chat-insert-backlog-entry (msg) ----------------------------------------------------------------------- Summary of changes: jabber-chat.el | 37 +++++++++++++++++++------------------ 1 files changed, 19 insertions(+), 18 deletions(-) hooks/post-receive -- emacs-jabber |