From d607c784881a5b49b1f060b1fd9a742ce6cc038f Mon Sep 17 00:00:00 2001 From: Michael Welsh Duggan Date: Sun, 17 Jun 2012 18:39:51 -0400 Subject: [PATCH] Set window-point-insertion-type to t in imap log. --- lisp/nnimap.el | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/lisp/nnimap.el b/lisp/nnimap.el index 1fa0bea..3cfe10b 100644 --- a/lisp/nnimap.el +++ b/lisp/nnimap.el @@ -1730,15 +1730,23 @@ if READ-ONLY is set, send EXAMINE rather than SELECT to the server." (defvar nnimap-record-commands nil "If non-nil, log commands to the \"*imap log*\" buffer.") +(defun nnimap-log-buffer () + (let ((name "*imap log*")) + (or (get-buffer name) + (with-current-buffer (get-buffer-create name) + (make-local-variable 'window-point-insertion-type) + (setq window-point-insertion-type t) + (current-buffer))))) + (defun nnimap-log-command (command) (when nnimap-record-commands - (with-current-buffer (get-buffer-create "*imap log*") + (with-current-buffer (nnimap-log-buffer) (goto-char (point-max)) (insert (format-time-string "%H:%M:%S") - " [" nnimap-address "] " - (if nnimap-inhibit-logging - "(inhibited)\n" - command)))) + " [" nnimap-address "] " + (if nnimap-inhibit-logging + "(inhibited)\n" + command)))) command) (defun nnimap-command (&rest args) -- 1.7.10.4