[gnus git] branch master updated: m0-11-158-g4c32298 =1= Fix inserting parts with `E' in Gnus
Lars <[email protected]> Sat, 14 Feb 2015 06:01:34 +0100
| Newsgroups | gmane.emacs.gnus.cvs |
|---|---|
| Message-ID | <[email protected]> |
via 4c322986ceccf098ec4ddc3f9c94e541242830d6 (commit)
from 99b7b0ddf235365e9becb0bd97879367874f66e7 (commit)
- Log -----------------------------------------------------------------
commit 4c322986ceccf098ec4ddc3f9c94e541242830d6
Author: Lars Magne Ingebrigtsen <[email protected]>
Date: Sat Feb 14 16:01:20 2015 +1100
Fix inserting parts with `E' in Gnus
* lisp/mm-decode.el (mm-head-p): New function.
(mm-display-part): Go to a blank line when inserting parts internally.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8110acc..9f93a30 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2015-02-14 Lars Ingebrigtsen <[email protected]>
+
+ * mm-decode.el (mm-head-p): New function.
+ (mm-display-part): Go to a blank line when inserting parts internally.
+
2015-02-13 Lars Ingebrigtsen <[email protected]>
* gnus-msg.el (gnus-msg-mail): Don't let-bind `gnus-newsgroup-name' so
diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el
index 1e31630..c9197e4 100644
--- a/lisp/gnus-art.el
+++ b/lisp/gnus-art.el
@@ -5506,7 +5506,8 @@ If no internal viewer is available, use an external viewer."
(gnus-mime-view-part-as-type
nil (lambda (type) (mm-inlinable-p handle type)))
(when handle
- (gnus-bind-safe-url-regexp (mm-display-part handle))))))
+ (gnus-bind-safe-url-regexp
+ (mm-display-part handle nil t))))))
(defun gnus-mime-action-on-part (&optional action)
"Do something with the MIME attachment at \(point\)."
diff --git a/lisp/mm-decode.el b/lisp/mm-decode.el
index 3fdcdba..459c793 100644
--- a/lisp/mm-decode.el
+++ b/lisp/mm-decode.el
@@ -791,6 +791,14 @@ MIME-Version header before proceeding."
(autoload 'mailcap-parse-mailcaps "mailcap")
(autoload 'mailcap-mime-info "mailcap")
+(defun mm-head-p (&optional point)
+ "Return non-nil if point is in the article header."
+ (let ((point (or point (point))))
+ (save-excursion
+ (goto-char point)
+ (and (not (re-search-backward "^$" nil t))
+ (re-search-forward "^$" nil t)))))
+
(defun mm-display-part (handle &optional no-default force)
"Display the MIME part represented by HANDLE.
Returns nil if the part is removed; inline if displayed inline;
@@ -824,6 +832,10 @@ external if displayed external."
'inline)
((and (mm-inlinable-p ehandle)
(mm-inlined-p ehandle))
+ (when force
+ (if (mm-head-p)
+ (re-search-forward "^$" nil t)
+ (forward-line 1)))
(mm-display-inline handle)
'inline)
((or method
-----------------------------------------------------------------------
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 | 3 ++-
lisp/mm-decode.el | 12 ++++++++++++
3 files changed, 19 insertions(+), 1 deletion(-)
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