X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-lib.el;h=bc550dc26808f2abb2db7eb209a1382826c09c10;hb=6cae6f32b197f863c2e53a8fc28d888998a4fb7c;hp=72549a986f61e884a2e5adb35aa187d2887d21af;hpb=65fc5ea758b959ceec173b90e57cbca22f57c4a2;p=notmuch diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index 72549a98..bc550dc2 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -22,6 +22,8 @@ ;;; Code: (require 'cl-lib) +(require 'pcase) +(require 'subr-x) (require 'mm-util) (require 'mm-view) @@ -101,6 +103,7 @@ search results. Note that any filtered searches created by search." :type 'boolean :group 'notmuch-search) +(make-variable-buffer-local 'notmuch-search-oldest-first) (defcustom notmuch-poll-script nil "[Deprecated] Command to run to incorporate new mail into the notmuch database. @@ -282,7 +285,7 @@ depending on the value of `notmuch-poll-script'." (interactive) (message "Polling mail...") (if (stringp notmuch-poll-script) - (unless (string= notmuch-poll-script "") + (unless (string-empty-p notmuch-poll-script) (unless (equal (call-process notmuch-poll-script nil nil) 0) (error "Notmuch: poll script `%s' failed!" notmuch-poll-script))) (notmuch-call-notmuch-process "new")) @@ -415,9 +418,9 @@ A command that supports a prefix argument can explicitly document its prefixed behavior by setting the 'notmuch-prefix-doc property of its command symbol." (interactive) - (let* ((mode major-mode) - (doc (substitute-command-keys - (notmuch-substitute-command-keys (documentation mode t))))) + (let ((doc (substitute-command-keys + (notmuch-substitute-command-keys + (documentation major-mode t))))) (with-current-buffer (generate-new-buffer "*notmuch-help*") (insert doc) (goto-char (point-min))