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

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

[elpa] externals/cursory 0c8c41cff2 1/5: Refine default value of prompt


From: ELPA Syncer
Subject: [elpa] externals/cursory 0c8c41cff2 1/5: Refine default value of prompt
Date: Sun, 4 Sep 2022 04:57:39 -0400 (EDT)

branch: externals/cursory
commit 0c8c41cff2302d91140348428e35e6d69a271558
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Refine default value of prompt
    
    Use the previous one from the history, if available.
---
 cursory.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/cursory.el b/cursory.el
index 93944ce3ce..d61a8ec2b3 100644
--- a/cursory.el
+++ b/cursory.el
@@ -146,10 +146,13 @@ Saving is done by the `cursory-store-latest-preset' 
function."
 
 (defun cursory--set-cursor-prompt ()
   "Promp for `cursory-presets' (used by `cursory-set-preset')."
-  (let ((def (nth 1 cursory--style-hist)))
+  (let* ((def (nth 1 cursory--style-hist))
+         (prompt (if def
+                     (format "Apply cursor configurations from PRESET [%s]: " 
def)
+                   "Apply cursor configurations from PRESET: ")))
     (completing-read
-     (format "Select cursor STYLE [%s]: " def)
      (mapcar #'car cursory-presets)
+     prompt
      nil t nil 'cursory--style-hist def)))
 
 ;;;###autoload



reply via email to

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