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

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

[elpa] externals/denote 71b56a6b0f 22/39: Refine interactive spec of 'de


From: ELPA Syncer
Subject: [elpa] externals/denote 71b56a6b0f 22/39: Refine interactive spec of 'denote' command
Date: Mon, 11 Jul 2022 00:57:45 -0400 (EDT)

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

    Refine interactive spec of 'denote' command
    
    Thanks to Jean-Philippe Gagné Guay for the feedback in issue 41 over at
    the GitHub mirror: <https://github.com/protesilaos/denote/issues/41>.
    
    Co-authored-by: Jean-Philippe Gagné Guay <jeanphilippe150@gmail.com>
---
 denote.el | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/denote.el b/denote.el
index 8a068fabd7..22f85f3208 100644
--- a/denote.el
+++ b/denote.el
@@ -736,15 +736,16 @@ When called from Lisp, all arguments are optional.
 - SUBDIR is a string representing the path to either the value of
   the variable `denote-directory' or a subdirectory thereof.  The
   subdirectory must exist: Denote will not create it."
-  (interactive)
-  (when (called-interactively-p 'any)
-    (dolist (prompt denote-prompts)
-      (pcase prompt
-        ('title (setq title (denote--title-prompt)))
-        ('date (setq date (denote--date-prompt)))
-        ('file-type (setq type (denote--file-type-prompt)))
-        ('subdirectory (setq subdir (denote--subdirs-prompt)))
-        ('keywords (setq keywords (denote--keywords-prompt))))))
+  (interactive
+   (let ((args (make-vector 5 nil)))
+     (dolist (prompt denote-prompts)
+       (pcase prompt
+         ('title (aset args 0 (denote--title-prompt)))
+         ('keywords (aset args 1 (denote--keywords-prompt)))
+         ('file-type (aset args 2 (denote--file-type-prompt)))
+         ('date (aset args 3 (denote--date-prompt)))
+         ('subdirectory (aset args 4 (denote--subdirs-prompt)))))
+     (append args nil)))
   (let* ((denote-file-type (denote--file-type-symbol (or type 
denote-file-type)))
          (date (if (or (null date) (string-empty-p date))
                    (current-time)



reply via email to

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