branch: externals/denote commit b2d6b747266fd44f2cccd3fd4eb8ce1952d43772 Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Rename denote-grep-query-history and make the histories reference each other This is how we do it with all our prompts. In practice, it is used in an interactive spec though it might be used outside of one (also considering how users may choose to use our functions). This builds on top of commit f70c96c, which was contributed by Lucas Quintana in pull request 571: <https://github.com/protesilaos/denote/pull/571>. Lucas has assigned copyright to the Free Software Foundation. --- denote.el | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/denote.el b/denote.el index 2737e18ee0..d9b72068d2 100644 --- a/denote.el +++ b/denote.el @@ -5254,11 +5254,9 @@ It accepts the same arguments as `denote-make-links-buffer'.") ;;;;;; Additional features for searching file contents -(defvar denote-grep-query-history nil - "Minibuffer history for `denote-grep' commands.") - -(defvar denote-grep-file-regexp-history nil - "Minibuffer history for `denote-grep' commands asking for a file regexp.") +(defvar denote-grep-history nil + "Minibuffer history of content searches performed by `denote-grep'. +Also see `denote-grep-file-regexp-history'.") (defun denote-grep-query-prompt (&optional type) "Prompt for a grep query in the minibuffer. @@ -5273,7 +5271,11 @@ TYPE only affects the prompt, not the returned value." (cond ((eq type :focused) "Search (only files matched last): ") (t "Search (all Denote files): ")) - nil 'denote-grep-query-history)) + nil 'denote-grep-history)) + +(defvar denote-grep-file-regexp-history nil + "Minibuffer history for `denote-grep' commands asking for a file regexp. +Also see `denote-grep-history'.") (defun denote-grep-file-regexp-prompt (&optional include) "Prompt for a file regexp in the minibuffer.