summaryrefslogtreecommitdiff
path: root/lisp/gnus/gnus-salt.el
diff options
context:
space:
mode:
authorGnus developers <ding@gnus.org>2012-12-25 22:12:59 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2012-12-25 22:12:59 +0000
commitcc21c2356dbbf361a288cdb061f2f708b5392b93 (patch)
tree390ffda804c01eacd9bf770e323adf4b8d0e0f32 /lisp/gnus/gnus-salt.el
parentf1665bdc87db38350a9fb0b497d2b14afbfa7140 (diff)
downloademacs-cc21c2356dbbf361a288cdb061f2f708b5392b93.tar.gz
emacs-cc21c2356dbbf361a288cdb061f2f708b5392b93.tar.bz2
emacs-cc21c2356dbbf361a288cdb061f2f708b5392b93.zip
Merge changes made in Gnus master
2012-12-25 Lars Ingebrigtsen <larsi@gnus.org> * gnus-sum.el (gnus-set-global-variables): Don't copy over the summary buffer to the article buffer here, because that clobbers multiple article buffers. * gnus-art.el (gnus-article-setup-buffer): Make sure that the article buffer always points to the right summary buffer. 2012-12-25 John Wiegley <jwiegley@gmail.com> * auth-source.el (auth-source-netrc-parse): Allow using "password" as the password (bug#12097). 2012-12-25 Lars Ingebrigtsen <larsi@gnus.org> * shr.el (shr-tag-a): Don't tagify <A> elements that don't have HREFs (bug#13263). * gnus-salt.el (gnus-highlight-selected-tree): Check whether the Tree buffer exists before using it (bug#12475). * gnus-agent.el (gnus-agent-fetch-articles): Don't fetch articles from offline groups (bug#11937). * message.el (message-yank-original): When using customize to set the value of `message-cite-style', the variable it set to a symbol that's the name of the variable, which must then be dereferenced (bug#12616). 2012-09-13 Wolfgang Jenkner <wjenkner@inode.at> * lisp/gnus-spec.el (gnus-face-face-function): Initialize the value of the `face' property with a list whose car is the face specified in the format string and whose cdr is (nil). * lisp/gnus-util.el (gnus-put-text-property-excluding-characters-with-faces): Change accordingly. (gnus-get-text-property-excluding-characters-with-faces): New function. * lisp/gnus-sum.el (gnus-summary-highlight-line): * lisp/gnus-salt.el (gnus-tree-highlight-node): * lisp/gnus-group.el (gnus-group-highlight-line): Use it.
Diffstat (limited to 'lisp/gnus/gnus-salt.el')
-rw-r--r--lisp/gnus/gnus-salt.el54
1 files changed, 28 insertions, 26 deletions
diff --git a/lisp/gnus/gnus-salt.el b/lisp/gnus/gnus-salt.el
index 760a7a0942e..cb4101b5806 100644
--- a/lisp/gnus/gnus-salt.el
+++ b/lisp/gnus/gnus-salt.el
@@ -659,7 +659,7 @@ Two predefined functions are available:
(while (and list
(not (eval (caar list))))
(setq list (cdr list)))))
- (unless (eq (setq face (cdar list)) (get-text-property beg 'face))
+ (unless (eq (setq face (cdar list)) (gnus-get-text-property-excluding-characters-with-faces beg 'face))
(gnus-put-text-property-excluding-characters-with-faces
beg end 'face
(if (boundp face) (symbol-value face) face)))))
@@ -828,31 +828,33 @@ Two predefined functions are available:
(defun gnus-highlight-selected-tree (article)
"Highlight the selected article in the tree."
- (let ((buf (current-buffer))
- region)
- (set-buffer gnus-tree-buffer)
- (when (setq region (gnus-tree-article-region article))
- (when (or (not gnus-selected-tree-overlay)
- (gnus-extent-detached-p gnus-selected-tree-overlay))
- ;; Create a new overlay.
- (gnus-overlay-put
- (setq gnus-selected-tree-overlay
- (gnus-make-overlay (point-min) (1+ (point-min))))
- 'face gnus-selected-tree-face))
- ;; Move the overlay to the article.
- (gnus-move-overlay
- gnus-selected-tree-overlay (goto-char (car region)) (cdr region))
- (gnus-tree-minimize)
- (gnus-tree-recenter)
- (let ((selected (selected-window)))
- (when (gnus-get-buffer-window (set-buffer gnus-tree-buffer) t)
- (select-window (gnus-get-buffer-window (set-buffer gnus-tree-buffer) t))
- (gnus-horizontal-recenter)
- (select-window selected))))
-;; If we remove this save-excursion, it updates the wrong mode lines?!?
- (with-current-buffer gnus-tree-buffer
- (gnus-set-mode-line 'tree))
- (set-buffer buf)))
+ (when (buffer-live-p gnus-tree-buffer)
+ (let ((buf (current-buffer))
+ region)
+ (set-buffer gnus-tree-buffer)
+ (when (setq region (gnus-tree-article-region article))
+ (when (or (not gnus-selected-tree-overlay)
+ (gnus-extent-detached-p gnus-selected-tree-overlay))
+ ;; Create a new overlay.
+ (gnus-overlay-put
+ (setq gnus-selected-tree-overlay
+ (gnus-make-overlay (point-min) (1+ (point-min))))
+ 'face gnus-selected-tree-face))
+ ;; Move the overlay to the article.
+ (gnus-move-overlay
+ gnus-selected-tree-overlay (goto-char (car region)) (cdr region))
+ (gnus-tree-minimize)
+ (gnus-tree-recenter)
+ (let ((selected (selected-window)))
+ (when (gnus-get-buffer-window (set-buffer gnus-tree-buffer) t)
+ (select-window
+ (gnus-get-buffer-window (set-buffer gnus-tree-buffer) t))
+ (gnus-horizontal-recenter)
+ (select-window selected))))
+ ;; If we remove this save-excursion, it updates the wrong mode lines?!?
+ (with-current-buffer gnus-tree-buffer
+ (gnus-set-mode-line 'tree))
+ (set-buffer buf))))
(defun gnus-tree-highlight-article (article face)
(with-current-buffer (gnus-get-tree-buffer)