X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-lib.el;h=623f4fad1d4df630136a79b33cc09348d0a85fd0;hb=6f616bd733eaa010eb68dd588d56d5d909f1631d;hp=08a86fd37afa757a39ca03ba29baa7b438b8783f;hpb=730b8f61e0cf4b2e8c0f123c0914d472d6df38fc;p=notmuch diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index 08a86fd3..623f4fad 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -80,9 +80,8 @@ search." "An external script to incorporate new mail into the notmuch database. This variable controls the action invoked by -`notmuch-search-poll-and-refresh-view' and -`notmuch-hello-poll-and-update' (each have a default keybinding -of 'G') to incorporate new mail into the notmuch database. +`notmuch-poll-and-refresh-this-buffer' (bound by default to 'G') +to incorporate new mail into the notmuch database. If set to nil (the default), new mail is processed by invoking \"notmuch new\". Otherwise, this should be set to a string that @@ -254,7 +253,7 @@ prefix argument. PREFIX and TAIL are used internally." (setq tail (notmuch-describe-keymap binding ua-keys (notmuch-prefix-key-description key) tail))) - (t + (binding (when (and ua-keys (symbolp binding) (get binding 'notmuch-prefix-doc)) ;; Documentation for prefixed command @@ -274,11 +273,13 @@ prefix argument. PREFIX and TAIL are used internally." "Like `substitute-command-keys' but with documentation, not function names." (let ((beg 0)) (while (string-match "\\\\{\\([^}[:space:]]*\\)}" doc beg) - (let* ((keymap-name (substring doc (match-beginning 1) (match-end 1))) - (keymap (symbol-value (intern keymap-name))) - (ua-keys (where-is-internal 'universal-argument keymap t)) - (desc-list (notmuch-describe-keymap keymap ua-keys)) - (desc (mapconcat #'identity desc-list "\n"))) + (let ((desc + (save-match-data + (let* ((keymap-name (substring doc (match-beginning 1) (match-end 1))) + (keymap (symbol-value (intern keymap-name))) + (ua-keys (where-is-internal 'universal-argument keymap t)) + (desc-list (notmuch-describe-keymap keymap ua-keys))) + (mapconcat #'identity desc-list "\n"))))) (setq doc (replace-match desc 1 1 doc))) (setq beg (match-end 0))) doc))