[gnus git] branch master updated: m0-11-14-g974ba1f =1= gnus-art.el (gnus-mime-inline-part, gnus-mm-display-part): Don't delete next part button; keep spacing between buttons
Katsumi Yamaoka <[email protected]> Thu, 15 May 2014 08:53:38 +0200
| Newsgroups | gmane.emacs.gnus.cvs |
|---|---|
| Message-ID | <[email protected]> |
via 974ba1f3c0ff7f80e205fad25aed6889b08bde07 (commit)
from fad73dc987ae0a339e2c603c25ff33d9c9ade8b6 (commit)
- Log -----------------------------------------------------------------
commit 974ba1f3c0ff7f80e205fad25aed6889b08bde07
Author: Katsumi Yamaoka <[email protected]>
Date: Thu May 15 06:53:33 2014 +0000
gnus-art.el (gnus-mime-inline-part, gnus-mm-display-part): Don't delete next part button; keep spacing between buttons
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f1992be..bc14853 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2014-05-15 Katsumi Yamaoka <[email protected]>
+
+ * gnus-art.el (gnus-mime-inline-part, gnus-mm-display-part): Don't
+ delete next part button; keep spacing between buttons.
+
2014-05-14 Katsumi Yamaoka <[email protected]>
* gnus-art.el (gnus-mime-inline-part, gnus-mm-display-part):
diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el
index 1949e97..01d8378 100644
--- a/lisp/gnus-art.el
+++ b/lisp/gnus-art.el
@@ -5312,13 +5312,13 @@ Compressed files like .gz and .bz2 are decompressed."
(text-property-any (point-min) (point) 'gnus-data handle)))
(setq handle (get-text-property b 'gnus-data))
b))
- contents charset coding-system)
+ start contents charset coding-system)
(when handle
(when (= b (prog1
btn
- (setq btn (previous-single-property-change
- (or (next-single-property-change btn 'gnus-data)
- (point-max))
+ (setq start (next-single-property-change btn 'gnus-data
+ nil (point-max))
+ btn (previous-single-property-change start
'gnus-data))))
(setq b btn))
(if (and (not arg) (mm-handle-undisplayer handle))
@@ -5346,25 +5346,29 @@ Compressed files like .gz and .bz2 are decompressed."
(mm-read-coding-system "Charset: "))))
((mm-handle-undisplayer handle)
(mm-remove-part handle)))
- (forward-line 1)
+ (goto-char start)
(mm-display-inline handle))
;; Toggle the button appearance between `[button]...' and `[button]'.
(goto-char btn)
+ (let ((displayed-p (mm-handle-displayed-p handle)))
(gnus-insert-mime-button handle (get-text-property btn 'gnus-part)
- (list (mm-handle-displayed-p handle)))
+ (list displayed-p))
(if (featurep 'emacs)
(delete-region
(point)
- (or (text-property-any (point) (point-max) 'gnus-data nil)
- (point-max)))
- (let* ((end (text-property-any (point) (point-max) 'gnus-data nil))
- (annots (annotations-at end)))
+ (next-single-property-change (point) 'gnus-data nil (point-max)))
+ (let* ((end (next-single-property-change (point) 'gnus-data))
+ (annots (annotations-at (or end (point-max)))))
(delete-region (point)
(if end
(if annots (1+ end) end)
(point-max)))
(dolist (annot annots)
(set-extent-endpoints annot (point) (point)))))
+ (unless (or displayed-p (eolp))
+ ;; Add extra newline.
+ (insert (propertize (buffer-substring (1- (point)) (point))
+ 'gnus-undeletable t))))
(unless (search-backward "\n\n" nil t)
;; We're in the article header.
(delete-char -1)
@@ -5687,17 +5691,16 @@ all parts."
(with-current-buffer gnus-summary-buffer
gnus-newsgroup-ignored-charsets)
nil))
- retval)
+ start retval)
(unwind-protect
(progn
(let ((win (gnus-get-buffer-window (current-buffer) t)))
(when win
(select-window win)
(goto-char point)))
- (setq point (previous-single-property-change
- (or (next-single-property-change point 'gnus-data)
- (point-max))
- 'gnus-data))
+ (setq start (next-single-property-change point 'gnus-data
+ nil (point-max))
+ point (previous-single-property-change start 'gnus-data))
(if (mm-handle-displayed-p handle)
;; This will remove the part.
(setq retval (mm-display-part handle))
@@ -5709,7 +5712,7 @@ all parts."
(setq retval (mm-display-part handle)))
(unless (zerop (buffer-size))
(buffer-string))))))
- (forward-line)
+ (goto-char start)
(cond ((stringp part)
(save-restriction
(narrow-to-region (point)
@@ -5730,20 +5733,24 @@ all parts."
(mm-display-inline handle))))))
(goto-char point)
;; Toggle the button appearance between `[button]...' and `[button]'.
- (gnus-insert-mime-button handle id (list (mm-handle-displayed-p handle)))
+ (let ((displayed-p (mm-handle-displayed-p handle)))
+ (gnus-insert-mime-button handle id (list displayed-p))
(if (featurep 'emacs)
(delete-region
(point)
- (or (text-property-any (point) (point-max) 'gnus-data nil)
- (point-max)))
- (let* ((end (text-property-any (point) (point-max) 'gnus-data nil))
- (annots (annotations-at end)))
+ (next-single-property-change (point) 'gnus-data nil (point-max)))
+ (let* ((end (next-single-property-change (point) 'gnus-data))
+ (annots (annotations-at (or end (point-max)))))
(delete-region (point)
(if end
(if annots (1+ end) end)
(point-max)))
(dolist (annot annots)
(set-extent-endpoints annot (point) (point)))))
+ (unless (or displayed-p (eolp))
+ ;; Add extra newline.
+ (insert (propertize (buffer-substring (1- (point)) (point))
+ 'gnus-undeletable t))))
(unless (search-backward "\n\n" nil t)
;; We're in the article header.
(delete-char -1)
-----------------------------------------------------------------------
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 | 89 +++++++++++++++++++++++++++++-------------------------
2 files changed, 53 insertions(+), 41 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