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

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

[elpa] externals/fountain-mode 0fd23b7 6/6: Use read-char-choice for fou


From: Paul W. Rankin
Subject: [elpa] externals/fountain-mode 0fd23b7 6/6: Use read-char-choice for fountain-set-font-lock-decoration
Date: Tue, 27 Aug 2019 02:46:39 -0400 (EDT)

branch: externals/fountain-mode
commit 0fd23b76e7f6064a40efe09e1b32636778348ac5
Author: Paul W. Rankin <address@hidden>
Commit: Paul W. Rankin <address@hidden>

    Use read-char-choice for fountain-set-font-lock-decoration
    
    User no longer needs to press RET after choice.
---
 fountain-mode.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/fountain-mode.el b/fountain-mode.el
index 5044956..edcd654 100644
--- a/fountain-mode.el
+++ b/fountain-mode.el
@@ -4719,9 +4719,12 @@ assigning the following keywords:
           (t 2))))
 
 (defun fountain-set-font-lock-decoration (n)
-  ;; FIXME: use read-char-choice instead
   "Set `font-lock-maximum-decoration' for `fountain-mode' to N."
-  (interactive "NMaximum decoration (1-3): ")
+  (interactive
+   (list (or current-prefix-arg
+             (string-to-number (char-to-string
+               (read-char-choice "Maximum decoration (1-3): "
+                                 '(?1 ?2 ?3)))))))
   (if (and (integerp n)
            (<= 1 n 3))
       (let ((level (cond ((= n 1) 1)



reply via email to

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