[gnus git] branch master updated: m0-9-52-g0606f00 =1= gnus-art.el (gnus-mime-buttonize-attachments-in-header): Number unnumbered MIME handles

Katsumi Yamaoka <[email protected]> Mon, 10 Feb 2014 01:18:51 +0100
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  0606f000241707b6aea460c64f34185cf680dc0b (commit)
      from  b072de812cb628a3c5f826b207886070391f359f (commit)


- Log -----------------------------------------------------------------
commit 0606f000241707b6aea460c64f34185cf680dc0b
Author: Katsumi Yamaoka <[email protected]>
Date:   Mon Feb 10 00:17:50 2014 +0000

    gnus-art.el (gnus-mime-buttonize-attachments-in-header): Number unnumbered MIME handles
    
    gnus-art.el (gnus-article-goto-part): Find a button in the body first.
     (gnus-mime-buttonize-attachments-in-header): Number hidden buttons.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c8d5082..fb165c6 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2014-02-10  Katsumi Yamaoka  <[email protected]>
+
+	* gnus-art.el (gnus-article-goto-part): Find a button in the body first.
+	(gnus-mime-buttonize-attachments-in-header): Number hidden buttons.
+
 2014-02-09  Lars Ingebrigtsen  <[email protected]>
 
 	* message.el (message-tab): Mention what happens on normal tabs
diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el
index 20b63f7..eb57a55 100644
--- a/lisp/gnus-art.el
+++ b/lisp/gnus-art.el
@@ -5678,8 +5678,11 @@ all parts."
   "Go to MIME part N."
   (when gnus-break-pages
     (widen))
+  (article-goto-body)
   (prog1
-      (let ((start (text-property-any (point-min) (point-max) 'gnus-part n))
+      (let ((start (or (text-property-any (point) (point-max) 'gnus-part n)
+		       ;; There may be header buttons.
+		       (text-property-any (point-min) (point) 'gnus-part n)))
 	    part handle end next handles)
 	(when start
 	  (goto-char start)
@@ -6252,8 +6255,13 @@ in the body.  Use `gnus-header-face-alist' to highlight buttons."
 						     (cdr handle)))))))
 	      (setq flat (cdr flat))
 	      (mapc (lambda (handle)
-		      (setcar handle (mapconcat 'number-to-string (car handle)
-						".")))
+		      (if (cdar handle)
+			  ;; This is a hidden (i.e. unnumbered) handle.
+			  (progn
+			    (setcar handle
+				    (1+ (caar gnus-article-mime-handle-alist)))
+			    (push handle gnus-article-mime-handle-alist))
+			(setcar handle (caar handle))))
 		    flat)
 	      flat))))
       (let ((case-fold-search t) buttons st)

-----------------------------------------------------------------------
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 |   14 +++++++++++---
 2 files changed, 16 insertions(+), 3 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