[PATCH v2 2/3] emacs: Pass the part to text/plain hook functions

David Edmondson dme at dme.org
Sat Dec 22 04:10:57 PST 2018


Some text/plain hook functions may wish to access the details of the
part that is being manipulated.
---
 emacs/notmuch-show.el |  2 +-
 emacs/notmuch-wash.el | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 78f1af47..b3cefcd9 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -744,7 +744,7 @@ will return nil if the CID is unknown or cannot be retrieved."
     (save-excursion
       (save-restriction
 	(narrow-to-region start (point-max))
-	(run-hook-with-args 'notmuch-show-insert-text/plain-hook msg depth))))
+	(run-hook-with-args 'notmuch-show-insert-text/plain-hook msg part depth))))
   t)
 
 (defun notmuch-show-insert-part-text/calendar (msg part content-type nth depth button)
diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el
index 54108d93..54275ec7 100644
--- a/emacs/notmuch-wash.el
+++ b/emacs/notmuch-wash.el
@@ -222,7 +222,7 @@ that PREFIX should not include a newline."
 				   :type button-type)))
 	  (overlay-put overlay 'notmuch-wash-button button))))))
 
-(defun notmuch-wash-excerpt-citations (msg depth)
+(defun notmuch-wash-excerpt-citations (msg part depth)
   "Excerpt citations and up to one signature."
   (goto-char (point-min))
   (beginning-of-line)
@@ -267,7 +267,7 @@ that PREFIX should not include a newline."
 
 ;;
 
-(defun notmuch-wash-elide-blank-lines (msg depth)
+(defun notmuch-wash-elide-blank-lines (msg part depth)
   "Elide leading, trailing and successive blank lines."
 
   ;; Algorithm derived from `article-strip-multiple-blank-lines' in
@@ -295,7 +295,7 @@ that PREFIX should not include a newline."
 
 ;;
 
-(defun notmuch-wash-tidy-citations (msg depth)
+(defun notmuch-wash-tidy-citations (msg part depth)
   "Improve the display of cited regions of a message.
 
 Perform several transformations on the message body:
@@ -326,7 +326,7 @@ Perform several transformations on the message body:
 
 ;;
 
-(defun notmuch-wash-wrap-long-lines (msg depth)
+(defun notmuch-wash-wrap-long-lines (msg part depth)
   "Wrap long lines in the message.
 
 If `notmuch-wash-wrap-lines-length' is a number, this will wrap
@@ -392,7 +392,7 @@ original filename the sender had."
 	  (or (notmuch-wash-subject-to-patch-sequence-number subject) 1)
 	  (notmuch-wash-subject-to-filename subject 52)))
 
-(defun notmuch-wash-convert-inline-patch-to-part (msg depth)
+(defun notmuch-wash-convert-inline-patch-to-part (msg part depth)
   "Convert an inline patch into a fake 'text/x-diff' attachment.
 
 Given that this function guesses whether a buffer includes a
-- 
2.11.0



More information about the notmuch mailing list