aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKatsumi Yamaoka2015-02-26 06:39:11 +0000
committerKatsumi Yamaoka2015-02-26 06:39:11 +0000
commit48598095b3b777dfaa80fd85ba8246de6e18b3cd (patch)
tree1d21d7e8d22c758fe17f2b61241200ea757b1171
parent8ae2142555b313c6939d7659e9db65431db06837 (diff)
downloademacs-48598095b3b777dfaa80fd85ba8246de6e18b3cd.tar.gz
emacs-48598095b3b777dfaa80fd85ba8246de6e18b3cd.zip
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.
-rw-r--r--lisp/gnus/ChangeLog6
-rw-r--r--lisp/gnus/gnus-art.el17
2 files changed, 19 insertions, 4 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 454957ecbb5..af49782a035 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,7 +1,9 @@
12015-02-26 Katsumi Yamaoka <yamaoka@jpl.org> 12015-02-26 Katsumi Yamaoka <yamaoka@jpl.org>
2 2
3 * gnus-art.el (gnus-article-edit-part): Make jumping to the next part 3 * gnus-art.el (gnus-mime-inline-part, gnus-mm-display-part):
4 really work when deleting or stripping. 4 Fix point motion when removing displayed MIME part.
5 (gnus-article-edit-part): Make jumping to the next part really work
6 when deleting or stripping.
5 (gnus-mime-buttonize-attachments-in-header): Make header attachment 7 (gnus-mime-buttonize-attachments-in-header): Make header attachment
6 buttons identical to the ones in the article body so as to work deleting 8 buttons identical to the ones in the article body so as to work deleting
7 and stripping. 9 and stripping.
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index f88e7d5eec3..5de4b5829ce 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -5360,7 +5360,10 @@ Compressed files like .gz and .bz2 are decompressed."
5360 'gnus-data)))) 5360 'gnus-data))))
5361 (setq b btn)) 5361 (setq b btn))
5362 (if (and (not arg) (mm-handle-undisplayer handle)) 5362 (if (and (not arg) (mm-handle-undisplayer handle))
5363 (mm-remove-part handle) 5363 (progn
5364 (setq b (copy-marker b)
5365 btn (copy-marker btn))
5366 (mm-remove-part handle))
5364 (cond 5367 (cond
5365 ((not arg) nil) 5368 ((not arg) nil)
5366 ((numberp arg) 5369 ((numberp arg)
@@ -5374,6 +5377,9 @@ Compressed files like .gz and .bz2 are decompressed."
5374 (forward-line 1)) 5377 (forward-line 1))
5375 (mm-display-inline handle)) 5378 (mm-display-inline handle))
5376 ;; Toggle the button appearance between `[button]...' and `[button]'. 5379 ;; Toggle the button appearance between `[button]...' and `[button]'.
5380 (when (markerp btn)
5381 (setq btn (prog1 (marker-position btn)
5382 (set-marker btn nil))))
5377 (goto-char btn) 5383 (goto-char btn)
5378 (let ((displayed-p (mm-handle-displayed-p handle))) 5384 (let ((displayed-p (mm-handle-displayed-p handle)))
5379 (gnus-insert-mime-button handle (get-text-property btn 'gnus-part) 5385 (gnus-insert-mime-button handle (get-text-property btn 'gnus-part)
@@ -5409,6 +5415,9 @@ Compressed files like .gz and .bz2 are decompressed."
5409 '((gnus-treat-highlight-headers 5415 '((gnus-treat-highlight-headers
5410 gnus-article-highlight-headers)))) 5416 gnus-article-highlight-headers))))
5411 (gnus-treat-article 'head))))) 5417 (gnus-treat-article 'head)))))
5418 (when (markerp b)
5419 (setq b (prog1 (marker-position b)
5420 (set-marker b nil))))
5412 (goto-char b)))) 5421 (goto-char b))))
5413 5422
5414(defun gnus-mime-set-charset-parameters (handle charset) 5423(defun gnus-mime-set-charset-parameters (handle charset)
@@ -5731,7 +5740,8 @@ all parts."
5731 point (previous-single-property-change start 'gnus-data)) 5740 point (previous-single-property-change start 'gnus-data))
5732 (if (mm-handle-displayed-p handle) 5741 (if (mm-handle-displayed-p handle)
5733 ;; This will remove the part. 5742 ;; This will remove the part.
5734 (setq retval (mm-display-part handle)) 5743 (setq point (copy-marker point)
5744 retval (mm-display-part handle))
5735 (let ((part (or (and (mm-inlinable-p handle) 5745 (let ((part (or (and (mm-inlinable-p handle)
5736 (mm-inlined-p handle) 5746 (mm-inlined-p handle)
5737 t) 5747 t)
@@ -5762,6 +5772,9 @@ all parts."
5762 ,(point-max-marker))))))) 5772 ,(point-max-marker)))))))
5763 (part 5773 (part
5764 (mm-display-inline handle)))))) 5774 (mm-display-inline handle))))))
5775 (when (markerp point)
5776 (setq point (prog1 (marker-position point)
5777 (set-marker point nil))))
5765 (goto-char point) 5778 (goto-char point)
5766 ;; Toggle the button appearance between `[button]...' and `[button]'. 5779 ;; Toggle the button appearance between `[button]...' and `[button]'.
5767 (let ((displayed-p (mm-handle-displayed-p handle))) 5780 (let ((displayed-p (mm-handle-displayed-p handle)))