aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2015-02-15 23:05:46 +0000
committerKatsumi Yamaoka2015-02-15 23:05:46 +0000
commit45c5ccd48cee9c703e64fc67139a2e3bb8e9b3a5 (patch)
tree74aa0a460b1bd23e382ff8f86073bfd84975449e
parentba5bc0ee7c81f2122072bee162fcf1dbd8b2a8f2 (diff)
downloademacs-45c5ccd48cee9c703e64fc67139a2e3bb8e9b3a5.tar.gz
emacs-45c5ccd48cee9c703e64fc67139a2e3bb8e9b3a5.zip
Fix inserting parts with `E' in Gnus
* lisp/gnus/mm-decode.el (mm-head-p): New function. (mm-display-part): Go to a blank line when inserting parts internally. Fix inserting parts with `E' in Gnus * lisp/gnus/mm-decode.el (mm-head-p): New function. (mm-display-part): Go to a blank line when inserting parts internally.
-rw-r--r--lisp/gnus/ChangeLog5
-rw-r--r--lisp/gnus/gnus-art.el3
-rw-r--r--lisp/gnus/mm-decode.el12
3 files changed, 19 insertions, 1 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 67929a30186..b9ae796782d 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,8 @@
12015-02-14 Lars Ingebrigtsen <larsi@gnus.org>
2
3 * mm-decode.el (mm-head-p): New function.
4 (mm-display-part): Go to a blank line when inserting parts internally.
5
12015-02-13 Lars Ingebrigtsen <larsi@gnus.org> 62015-02-13 Lars Ingebrigtsen <larsi@gnus.org>
2 7
3 * gnus-msg.el (gnus-msg-mail): Don't let-bind `gnus-newsgroup-name' so 8 * gnus-msg.el (gnus-msg-mail): Don't let-bind `gnus-newsgroup-name' so
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index b3121bf7518..85030959f79 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -5505,7 +5505,8 @@ If no internal viewer is available, use an external viewer."
5505 (gnus-mime-view-part-as-type 5505 (gnus-mime-view-part-as-type
5506 nil (lambda (type) (mm-inlinable-p handle type))) 5506 nil (lambda (type) (mm-inlinable-p handle type)))
5507 (when handle 5507 (when handle
5508 (gnus-bind-safe-url-regexp (mm-display-part handle)))))) 5508 (gnus-bind-safe-url-regexp
5509 (mm-display-part handle nil t))))))
5509 5510
5510(defun gnus-mime-action-on-part (&optional action) 5511(defun gnus-mime-action-on-part (&optional action)
5511 "Do something with the MIME attachment at \(point\)." 5512 "Do something with the MIME attachment at \(point\)."
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el
index 3fdcdba45c0..459c7935f9b 100644
--- a/lisp/gnus/mm-decode.el
+++ b/lisp/gnus/mm-decode.el
@@ -791,6 +791,14 @@ MIME-Version header before proceeding."
791(autoload 'mailcap-parse-mailcaps "mailcap") 791(autoload 'mailcap-parse-mailcaps "mailcap")
792(autoload 'mailcap-mime-info "mailcap") 792(autoload 'mailcap-mime-info "mailcap")
793 793
794(defun mm-head-p (&optional point)
795 "Return non-nil if point is in the article header."
796 (let ((point (or point (point))))
797 (save-excursion
798 (goto-char point)
799 (and (not (re-search-backward "^$" nil t))
800 (re-search-forward "^$" nil t)))))
801
794(defun mm-display-part (handle &optional no-default force) 802(defun mm-display-part (handle &optional no-default force)
795 "Display the MIME part represented by HANDLE. 803 "Display the MIME part represented by HANDLE.
796Returns nil if the part is removed; inline if displayed inline; 804Returns nil if the part is removed; inline if displayed inline;
@@ -824,6 +832,10 @@ external if displayed external."
824 'inline) 832 'inline)
825 ((and (mm-inlinable-p ehandle) 833 ((and (mm-inlinable-p ehandle)
826 (mm-inlined-p ehandle)) 834 (mm-inlined-p ehandle))
835 (when force
836 (if (mm-head-p)
837 (re-search-forward "^$" nil t)
838 (forward-line 1)))
827 (mm-display-inline handle) 839 (mm-display-inline handle)
828 'inline) 840 'inline)
829 ((or method 841 ((or method