[gnus git] branch master updated: m0-11-178-g3af70ac =1= Fix point motion when removing displayed MIME part
Katsumi <[email protected]> Thu, 26 Feb 2015 07:39:37 +0100
| Newsgroups | gmane.emacs.gnus.cvs |
|---|---|
| Message-ID | <[email protected]> |
via 3af70acba52b5c99b9856000740f97f05b318371 (commit)
from 4589438fda15f1ff5088d7918f37c670ae39ae38 (commit)
- Log -----------------------------------------------------------------
commit 3af70acba52b5c99b9856000740f97f05b318371
Author: Katsumi Yamaoka <[email protected]>
Date: Thu Feb 26 06:38:44 2015 +0000
Fix point motion when removing displayed MIME part
* gnus-art.el (gnus-mime-inline-part, gnus-mm-display-part):
Fix point motion when removing displayed MIME part.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7bae046..2047481 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,7 +1,9 @@
2015-02-26 Katsumi Yamaoka <[email protected]>
- * gnus-art.el (gnus-article-edit-part): Make jumping to the next part
- really work when deleting or stripping.
+ * gnus-art.el (gnus-mime-inline-part, gnus-mm-display-part):
+ Fix point motion when removing displayed MIME part.
+ (gnus-article-edit-part): Make jumping to the next part really work
+ when deleting or stripping.
(gnus-mime-buttonize-attachments-in-header): Make header attachment
buttons identical to the ones in the article body so as to work deleting
and stripping.
diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el
index 9ecfd47..b854716 100644
--- a/lisp/gnus-art.el
+++ b/lisp/gnus-art.el
@@ -5361,7 +5361,10 @@ Compressed files like .gz and .bz2 are decompressed."
'gnus-data))))
(setq b btn))
(if (and (not arg) (mm-handle-undisplayer handle))
- (mm-remove-part handle)
+ (progn
+ (setq b (copy-marker b)
+ btn (copy-marker btn))
+ (mm-remove-part handle))
(cond
((not arg) nil)
((numberp arg)
@@ -5375,6 +5378,9 @@ Compressed files like .gz and .bz2 are decompressed."
(forward-line 1))
(mm-display-inline handle))
;; Toggle the button appearance between `[button]...' and `[button]'.
+ (when (markerp btn)
+ (setq btn (prog1 (marker-position btn)
+ (set-marker btn nil))))
(goto-char btn)
(let ((displayed-p (mm-handle-displayed-p handle)))
(gnus-insert-mime-button handle (get-text-property btn 'gnus-part)
@@ -5410,6 +5416,9 @@ Compressed files like .gz and .bz2 are decompressed."
'((gnus-treat-highlight-headers
gnus-article-highlight-headers))))
(gnus-treat-article 'head)))))
+ (when (markerp b)
+ (setq b (prog1 (marker-position b)
+ (set-marker b nil))))
(goto-char b))))
(defun gnus-mime-set-charset-parameters (handle charset)
@@ -5732,7 +5741,8 @@ all parts."
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))
+ (setq point (copy-marker point)
+ retval (mm-display-part handle))
(let ((part (or (and (mm-inlinable-p handle)
(mm-inlined-p handle)
t)
@@ -5763,6 +5773,9 @@ all parts."
,(point-max-marker)))))))
(part
(mm-display-inline handle))))))
+ (when (markerp point)
+ (setq point (prog1 (marker-position point)
+ (set-marker point nil))))
(goto-char point)
;; Toggle the button appearance between `[button]...' and `[button]'.
(let ((displayed-p (mm-handle-displayed-p handle)))
-----------------------------------------------------------------------
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 | 6 ++++--
lisp/gnus-art.el | 17 +++++++++++++++--
2 files changed, 19 insertions(+), 4 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