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

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

[elpa] externals/cursory bd7aa2a6e5 1/2: Do not complete if only 1 prese


From: ELPA Syncer
Subject: [elpa] externals/cursory bd7aa2a6e5 1/2: Do not complete if only 1 preset is set
Date: Thu, 5 May 2022 11:57:28 -0400 (EDT)

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

    Do not complete if only 1 preset is set
    
    Just apply the preset directly.
---
 cursory.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/cursory.el b/cursory.el
index 23928c5f4d..2f0f75808c 100644
--- a/cursory.el
+++ b/cursory.el
@@ -132,7 +132,12 @@ STYLE is a symbol that represents the car of a list in
 
 With optional LOCAL as a prefix argument, set the
 `cursory-presets' only for the current buffer."
-  (interactive (list (cursory--set-cursor-prompt) current-prefix-arg))
+  (interactive
+   (list
+    (if (= (length cursory-presets) 1)
+        (caar cursory-presets)
+      (cursory--set-cursor-prompt))
+    current-prefix-arg))
   (when-let* ((styles (if (stringp style) (intern style) style))
               (properties (alist-get styles cursory-presets))
               (type (plist-get properties :cursor-type))



reply via email to

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