X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-lib.el;h=0f856bf0035e8bceb02cd2bb83a0be800c666dec;hb=6dd482a16dd16252f9c5783ee65ce8bcd3d87eca;hp=cc80fb29ee24a5f6d59b77e1a3632719b67ae726;hpb=bc382902c10c7c39076a8c70da846317f505f527;p=notmuch diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index cc80fb29..0f856bf0 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 () @@ -105,20 +105,14 @@ the user hasn't set this variable with the old or new value." ;; -;; XXX: This should be a generic function in emacs somewhere, not -;; here. -(defun point-invisible-p () - "Return whether the character at point is invisible. - -Here visibility is determined by `buffer-invisibility-spec' and -the invisible property of any overlays for point. It doesn't have -anything to do with whether point is currently being displayed -within the current window." - (let ((prop (get-char-property (point) 'invisible))) - (if (eq buffer-invisibility-spec t) - prop - (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 @@ -156,5 +150,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)