X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-lib.el;h=f93c957d5d72d0cc26704c673341471fc58d20ac;hb=9ade8160a6a3f6f55996d7a58dc2cd81a6df8395;hp=cc80fb29ee24a5f6d59b77e1a3632719b67ae726;hpb=bc382902c10c7c39076a8c70da846317f505f527;p=notmuch diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index cc80fb29..f93c957d 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -88,7 +88,7 @@ the user hasn't set this variable with the old or new value." (notmuch-config-get "user.primary_email")) (defun notmuch-user-other-email () - "Return the user.primary_email value (as a list) from the notmuch configuration." + "Return the user.other_email value (as a list) from the notmuch configuration." (split-string (notmuch-config-get "user.other_email") "\n")) (defun notmuch-kill-this-buffer () @@ -120,6 +120,15 @@ within the current window." (or (memq prop buffer-invisibility-spec) (assq prop buffer-invisibility-spec))))) +(defun notmuch-remove-if-not (predicate list) + "Return a copy of LIST with all items not satisfying PREDICATE removed." + (let (out) + (while list + (when (funcall predicate (car list)) + (push (car list) out)) + (setq list (cdr list))) + (nreverse out))) + ; This lets us avoid compiling these replacement functions when emacs ; is sufficiently new enough to supply them alone. We do the macro ; treatment rather than just wrapping our defun calls in a when form @@ -156,5 +165,10 @@ was called." "Return non-nil if OBJECT is a mouse click event." (memq (event-basic-type object) '(mouse-1 mouse-2 mouse-3 mouse-movement)))) +;; This variable is used only buffer local, but it needs to be +;; declared globally first to avoid compiler warnings. +(defvar notmuch-show-process-crypto nil) +(make-variable-buffer-local 'notmuch-show-process-crypto) + (provide 'notmuch-lib)