[gnus git] branch master updated: m0-11-15-g973171c =1= gnus-art.el (gnus-mime-inline-part, gnus-mm-display-part): Fix last change

Katsumi Yamaoka <[email protected]> Fri, 16 May 2014 01:31:24 +0200
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  973171c30c67bd76d0453f2e406d9295f7cb1eee (commit)
      from  974ba1f3c0ff7f80e205fad25aed6889b08bde07 (commit)


- Log -----------------------------------------------------------------
commit 973171c30c67bd76d0453f2e406d9295f7cb1eee
Author: Katsumi Yamaoka <[email protected]>
Date:   Thu May 15 23:31:15 2014 +0000

    gnus-art.el (gnus-mime-inline-part, gnus-mm-display-part): Fix last change

diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el
index 01d8378..d2cf73f 100644
--- a/lisp/gnus-art.el
+++ b/lisp/gnus-art.el
@@ -5347,6 +5347,9 @@ Compressed files like .gz and .bz2 are decompressed."
 	 ((mm-handle-undisplayer handle)
 	  (mm-remove-part handle)))
 	(goto-char start)
+	(unless (bolp)
+	  ;; This is a header button.
+	  (forward-line 1))
 	(mm-display-inline handle))
       ;; Toggle the button appearance between `[button]...' and `[button]'.
       (goto-char btn)
@@ -5365,11 +5368,14 @@ Compressed files like .gz and .bz2 are decompressed."
 			     (point-max)))
 	    (dolist (annot annots)
 	      (set-extent-endpoints annot (point) (point)))))
+	(setq start (point))
+	(if (search-backward "\n\n" nil t)
+	    (progn
+	      (goto-char start)
 	      (unless (or displayed-p (eolp))
 		;; Add extra newline.
-	  (insert (propertize (buffer-substring (1- (point)) (point))
+		(insert (propertize (buffer-substring (1- start) start)
 				    'gnus-undeletable t))))
-      (unless (search-backward "\n\n" nil t)
 	  ;; We're in the article header.
 	  (delete-char -1)
 	  (dolist (ovl (gnus-overlays-in btn (point)))
@@ -5380,7 +5386,7 @@ Compressed files like .gz and .bz2 are decompressed."
 	    (let ((gnus-treatment-function-alist
 		   '((gnus-treat-highlight-headers
 		      gnus-article-highlight-headers))))
-	    (gnus-treat-article 'head))))
+	      (gnus-treat-article 'head)))))
       (goto-char b))))
 
 (defun gnus-mime-set-charset-parameters (handle charset)
@@ -5713,6 +5719,9 @@ all parts."
 			      (unless (zerop (buffer-size))
 				(buffer-string))))))
 	      (goto-char start)
+	      (unless (bolp)
+		;; This is a header button.
+		(forward-line 1))
 	      (cond ((stringp part)
 		     (save-restriction
 		       (narrow-to-region (point)
@@ -5747,11 +5756,14 @@ all parts."
 			     (point-max)))
 	    (dolist (annot annots)
 	      (set-extent-endpoints annot (point) (point)))))
+	(setq start (point))
+	(if (search-backward "\n\n" nil t)
+	    (progn
+	      (goto-char start)
 	      (unless (or displayed-p (eolp))
 		;; Add extra newline.
-	  (insert (propertize (buffer-substring (1- (point)) (point))
+		(insert (propertize (buffer-substring (1- start) start)
 				    'gnus-undeletable t))))
-      (unless (search-backward "\n\n" nil t)
 	  ;; We're in the article header.
 	  (delete-char -1)
 	  (dolist (ovl (gnus-overlays-in point (point)))
@@ -5762,7 +5774,7 @@ all parts."
 	    (let ((gnus-treatment-function-alist
 		   '((gnus-treat-highlight-headers
 		      gnus-article-highlight-headers))))
-	    (gnus-treat-article 'head))))
+	      (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/gnus-art.el |   76 +++++++++++++++++++++++++++++++-----------------------
 1 file changed, 44 insertions(+), 32 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