X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-lib.el;h=6907a5f910b4e33b8efc9f6d65bee3708a1a2c82;hb=746fef0aeafe1f29720140ab8778cdee22d519cb;hp=c159dda9695b88f4e541a10bf3be999c49f19246;hpb=839a80513a2dc961cab9348bd1442f30611b0fe4;p=notmuch diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index c159dda9..6907a5f9 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -237,9 +237,12 @@ the given type." (or (plist-get part :content) (notmuch-get-bodypart-internal (notmuch-id-to-query (plist-get msg :id)) nth process-crypto))) -(defun notmuch-plist-to-alist (plist) +;; Converts a plist of headers to an alist of headers. The input plist should +;; have symbols of the form :Header as keys, and the resulting alist will have +;; symbols of the form 'Header as keys. +(defun notmuch-headers-plist-to-alist (plist) (loop for (key value . rest) on plist by #'cddr - collect (cons (substring (symbol-name key) 1) value))) + collect (cons (intern (substring (symbol-name key) 1)) value))) ;; Compatibility functions for versions of emacs before emacs 23. ;;