;;; gnus-salt.el --- alternate summary mode interfaces for Gnus
-;; Copyright (C) 1996-1999, 2001-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2001-2015 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
EVALSYM is then bound in BODY to a function that takes a sexp and evaluates
it in the environment specified by BINDINGS."
(declare (indent 2) (debug ((&rest (sym form)) sym body)))
- (if (ignore-errors (let ((x 3)) (eq (eval '(- x 1) '((x . 4))) x)))
+ (if (eval '(ignore-errors (let ((x 3)) (eq (eval '(- x 1) '((x . 4))) x))))
;; Use lexical vars if possible.
`(let* ((env (list ,@(mapcar (lambda (binding)
`(cons ',(car binding) ,(cadr binding)))
(set-buffer buf))))
(defun gnus-tree-highlight-article (article face)
- (with-current-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)
- (set-window-point
- (gnus-get-buffer-window (current-buffer) t) (cdr region))))))
+ ;; The save-excursion here is apparently necessary because
+ ;; `set-window-point' somehow manages to alter the buffer position.
+ (save-excursion
+ (with-current-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)
+ (set-window-point
+ (gnus-get-buffer-window (current-buffer) t) (cdr region)))))))
;;; Allow redefinition of functions.
(gnus-ems-redefine)