[gnus git] branch master updated: m0-9-91-g7212fdd =1= gnus-art.el (gnus-mm-display-part): Highlight header attachment buttons

Katsumi Yamaoka <[email protected]> Thu, 01 May 2014 09:59:26 +0200
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  7212fdd8f9318b35adaf02164abb545205d6e2cf (commit)
      from  b8984b316f51897bcd2b03407ee8ca54672cd5ac (commit)


- Log -----------------------------------------------------------------
commit 7212fdd8f9318b35adaf02164abb545205d6e2cf
Author: Katsumi Yamaoka <[email protected]>
Date:   Thu May 1 07:59:19 2014 +0000

    gnus-art.el (gnus-mm-display-part): Highlight header attachment buttons

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f5d300b..502eb52 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2014-05-01  Katsumi Yamaoka  <[email protected]>
+
+	* gnus-art.el (gnus-mm-display-part):
+	Highlight header attachment buttons.
+
 2014-04-30  Katsumi Yamaoka  <[email protected]>
 
 	* gnus-art.el (gnus-mm-display-part): Don't move point while toggling
diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el
index 9c8004f..94c414c 100644
--- a/lisp/gnus-art.el
+++ b/lisp/gnus-art.el
@@ -5674,15 +5674,27 @@ all parts."
 		 (mm-handle-media-type handle))))))
       (goto-char point)
       ;; Toggle the button appearance between `[button]...' and `[button]'.
-      (let ((end (next-single-property-change point 'gnus-data)))
-	(delete-region (previous-single-property-change end 'gnus-data) end))
+      (let ((end (next-single-property-change point 'gnus-data))
+	    start)
+	(delete-region
+	 (setq start (previous-single-property-change end 'gnus-data))
+	 end)
 	(gnus-insert-mime-button
 	 handle id (list (mm-handle-displayed-p handle)))
-      (let ((pt (point)))
+	(setq end (point))
 	(if (search-backward "\n\n" nil t)
-	    (goto-char pt)
+	    (goto-char end)
 	  ;; We're in the article header.
-	  (delete-char -1)))
+	  (delete-char -1)
+	  (dolist (ovl (gnus-overlays-in start (1- end)))
+	    (gnus-overlay-put ovl 'gnus-button-attachment-extra t)
+	    (gnus-overlay-put ovl 'face nil))
+	  (save-restriction
+	    (message-narrow-to-field)
+	    (let ((gnus-treatment-function-alist
+		   '((gnus-treat-highlight-headers
+		      gnus-article-highlight-headers))))
+	      (gnus-treat-article 'head)))))
       (goto-char point)
       (if (window-live-p window)
 	  (select-window window)))

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog   |    5 +++++
 lisp/gnus-art.el |   26 +++++++++++++++++++-------
 2 files changed, 24 insertions(+), 7 deletions(-)

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 "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project