]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-show.el
emacs: remove unused variable in `notmuch-show-insert-part-message/rfc822'
[notmuch] / emacs / notmuch-show.el
index d7fbbca9471b374b8ce26b22bd15084a2a8a690d..db691d428144c65c8de1cecca388be11f36c4f62 100644 (file)
@@ -460,8 +460,7 @@ current buffer, if possible."
     (button-put button 'face '(:foreground "blue"))
     ;; add signature status button if sigstatus provided
     (if (plist-member part :sigstatus)
-       (let* ((headers (plist-get msg :headers))
-              (from (plist-get headers :From))
+       (let* ((from (notmuch-show-get-header :From msg))
               (sigstatus (car (plist-get part :sigstatus))))
          (notmuch-crypto-insert-sigstatus-button sigstatus from))
       ;; if we're not adding sigstatus, tell the user how they can get it
@@ -487,8 +486,7 @@ current buffer, if possible."
          (notmuch-crypto-insert-encstatus-button encstatus)
          ;; add signature status button if sigstatus specified
          (if (plist-member part :sigstatus)
-             (let* ((headers (plist-get msg :headers))
-                    (from (plist-get headers :From))
+             (let* ((from (notmuch-show-get-header :From msg))
                     (sigstatus (car (plist-get part :sigstatus))))
                (notmuch-crypto-insert-sigstatus-button sigstatus from))))
       ;; if we're not adding encstatus, tell the user how they can get it
@@ -521,7 +519,6 @@ current buffer, if possible."
 (defun notmuch-show-insert-part-message/rfc822 (msg part content-type nth depth declared-type)
   (notmuch-show-insert-part-header nth declared-type content-type nil)
   (let* ((message (car (plist-get part :content)))
-        (headers (plist-get message :headers))
         (body (car (plist-get message :body)))
         (start (point)))
 
@@ -1089,9 +1086,9 @@ All currently available key bindings:
   "Return the filename of the current message."
   (notmuch-show-get-prop :filename))
 
-(defun notmuch-show-get-header (header)
+(defun notmuch-show-get-header (header &optional props)
   "Return the named header of the current message, if any."
-  (plist-get (notmuch-show-get-prop :headers) header))
+  (plist-get (notmuch-show-get-prop :headers props) header))
 
 (defun notmuch-show-get-cc ()
   (notmuch-show-get-header :Cc))