emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/denote 1bfc6c157c 08/10: Make denote-signature-prompt a


From: ELPA Syncer
Subject: [elpa] externals/denote 1bfc6c157c 08/10: Make denote-signature-prompt accept optional DEFAULT-SIGNATURE
Date: Fri, 20 Oct 2023 09:58:02 -0400 (EDT)

branch: externals/denote
commit 1bfc6c157ce527f0ccc6e8247e9d0f9693fde98a
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Make denote-signature-prompt accept optional DEFAULT-SIGNATURE
---
 README.org | 7 ++++---
 denote.el  | 9 +++++----
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/README.org b/README.org
index ab093236b3..872876a1e1 100644
--- a/README.org
+++ b/README.org
@@ -3833,9 +3833,10 @@ might change them without further notice.
 
 #+findex: denote-signature-prompt
 + Function ~denote-signature-prompt~ :: Prompt for signature string.
-  With optional =PROMPT-TEXT= use it in the minibuffer instead of the
-  default prompt. [ The =PROMPT-TEXT= is added as part of
-  {{{development-version}}}. ]
+  With optional =DEFAULT-SIGNATURE= use it as the default minibuffer
+  value. With optional =PROMPT-TEXT= use it in the minibuffer instead
+  of the default prompt. [ The =DEFAULT-SIGNATURE= and =PROMPT-TEXT=
+  arguments are added as part of {{{development-version}}}. ]
 
 #+findex: denote-file-prompt
 + Function ~denote-file-prompt~ :: Prompt for file with identifier in
diff --git a/denote.el b/denote.el
index d08abc5d40..1c6dcda596 100644
--- a/denote.el
+++ b/denote.el
@@ -1848,13 +1848,14 @@ packages such as `marginalia' and `embark')."
 (defvar denote--signature-history nil
   "Minibuffer history of `denote-signature-prompt'.")
 
-(defun denote-signature-prompt (&optional prompt-text)
+(defun denote-signature-prompt (&optional default-signature prompt-text)
   "Prompt for signature string.
-With optional PROMPT-TEXT use it in the minibuffer instead of the
-default prompt."
+With optional DEFAULT-SIGNATURE use it as the default minibuffer
+value.  With optional PROMPT-TEXT use it in the minibuffer
+instead of the default prompt."
   (read-string
    (format-prompt (or prompt-text "Provide signature") nil)
-   nil 'denote--signature-history))
+   nil 'denote--signature-history default-signature))
 
 ;;;;; Convenience commands as `denote' variants
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]