From: Dave Abrahams Date: Fri, 31 Jan 2014 00:24:24 +0000 (-0800) Subject: * gnus-salt.el (gnus-tree-highlight-article): Don't move point around X-Git-Url: http://cgit.sxemacs.org/?a=commitdiff_plain;ds=sidebyside;h=6b656500ac7b130d544d4f4d7575f85dab89aaaa;p=gnus * gnus-salt.el (gnus-tree-highlight-article): Don't move point around in the summary buffer (bug#13769). --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0d20dba37..e2542dc06 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-01-31 Dave Abrahams + + * gnus-salt.el (gnus-tree-highlight-article): Don't move point around + in the summary buffer (bug#13769). + 2014-01-31 Lars Ingebrigtsen * gnus-art.el (gnus-article-setup-buffer): Refresh the summary buffer diff --git a/lisp/gnus-salt.el b/lisp/gnus-salt.el index ef45bae1d..a69c5b545 100644 --- a/lisp/gnus-salt.el +++ b/lisp/gnus-salt.el @@ -879,7 +879,10 @@ it in the environment specified by BINDINGS." (set-buffer buf)))) (defun gnus-tree-highlight-article (article face) - (with-current-buffer (gnus-get-tree-buffer) + ;; The save-excursion here is apparently necessary because + ;; `set-window-point' somehow manages to alter the buffer position. + (save-excursion + (set-buffer (gnus-get-tree-buffer)) (let (region) (when (setq region (gnus-tree-article-region article)) (gnus-put-text-property (car region) (cdr region) 'face face)