[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/devil ef7a7d4c74 29/49: Add 'devil' customisation group
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/devil ef7a7d4c74 29/49: Add 'devil' customisation group |
Date: |
Mon, 15 May 2023 12:59:33 -0400 (EDT) |
branch: elpa/devil
commit ef7a7d4c7448a90f4785537b8d8d60eac2acc46a
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Susam Pal <susam@susam.net>
Add 'devil' customisation group
* devil.el (devil-key, devil-translations, devil-repeatable-keys,
devil-prompt): Convert to user options.
(global-devil-mode): Remove unnecessary :group tag.
---
devil.el | 38 ++++++++++++++++++++++++--------------
1 file changed, 24 insertions(+), 14 deletions(-)
diff --git a/devil.el b/devil.el
index fa08c5f381..d4fb39e987 100644
--- a/devil.el
+++ b/devil.el
@@ -38,20 +38,26 @@
;;; Code:
+(defgroup devil '()
+ "Minor mode for Devil-like command entering."
+ :prefix "devil-"
+ :group 'editing)
-(defvar devil-key ","
+(defcustom devil-key ","
"The key sequence that begins Devil input.
The key sequence must be specified in the format returned by `C-h
k' (`describe-key'). This variable should be set before enabling
-Devil mode for it to take effect.")
+Devil mode for it to take effect."
+ :type 'key-sequence)
-(defvar devil-lighter " Devil"
- "String displayed on the mode line when Devil mode is enabled.")
+(defcustom devil-lighter " Devil"
+ "String displayed on the mode line when Devil mode is enabled."
+ :type 'string)
(defvar devil-mode-map
(let ((map (make-sparse-keymap)))
- (define-key map (kbd devil-key) #'devil)
+ (define-key map devil-key #'devil)
map)
"Keymap to wake up Devil when `devil-key' is typed.
@@ -69,15 +75,16 @@ be modified before loading Devil for it to take effect.")
;;;###autoload
(define-globalized-minor-mode
- global-devil-mode devil-mode devil--on :group 'devil
+ global-devil-mode devil-mode devil--on
(if global-devil-mode (devil-add-extra-keys) (devil-remove-extra-keys)))
(defun devil--on ()
"Turn Devil mode on."
(devil-mode 1))
-(defvar devil-logging nil
- "Non-nil if and only if Devil should print log messages.")
+(defcustom devil-logging nil
+ "Non-nil if and only if Devil should print log messages."
+ :type 'boolean)
(defvar devil-special-keys
(list (cons "%k %k" (lambda () (interactive) (devil-run-key "%k")))
@@ -91,7 +98,7 @@ this alist, the function or lambda in the corresponding value
is
invoked. The format control specifier `%k' may be used to
represent `devil-key' in the keys.")
-(defvar devil-translations
+(defcustom devil-translations
(list (cons "%k z" "C-")
(cons "%k %k" "%k")
(cons "%k m m" "M-")
@@ -106,9 +113,10 @@ The translation rules are applied in the sequence they
occur in
the alist. For each rule, if the key occurs anywhere in the Devil
key sequence, it is replaced with the corresponding value in the
translation rule. The format control specifier `%k' may be used
-to represent `devil-key' in the keys.")
+to represent `devil-key' in the keys."
+ :type '(alist :key-type string :value-type string))
-(defvar devil-repeatable-keys
+(defcustom devil-repeatable-keys
(list "%k p"
"%k n"
"%k f"
@@ -124,7 +132,8 @@ to represent `devil-key' in the keys.")
The value of this variable is a list where each item represents a
key sequence that may be repeated merely by typing the last
character in the key sequence. The format control specified `%k'
-may be used to represent `devil-key' in the keys.")
+may be used to represent `devil-key' in the keys."
+ :type '(repeat string))
(defun devil-run-key (key)
"Execute the given key sequence KEY.
@@ -183,14 +192,15 @@ recursively to read yet another key from the user."
(unless (devil--run-command key)
(devil--read-key key)))
-(defvar devil-prompt "Devil: %t"
+(defcustom devil-prompt "Devil: %t"
"A format control string that determines the Devil prompt.
The following format control sequences are supported:
%k - Devil key sequence read by Devil so far.
%t - Emacs key sequence translated from Devil key sequence read so far.
-%% - The percent sign.")
+%% - The percent sign."
+ :type 'string)
(defun devil--make-prompt (key)
"Create Devil prompt based on the given KEY."
- [nongnu] elpa/devil f6ddd7cac1 38/49: Fix undefined error for RET, <f10>, etc., (continued)
- [nongnu] elpa/devil f6ddd7cac1 38/49: Fix undefined error for RET, <f10>, etc., ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil 72ce585e59 42/49: Document devil-all-keys-repeatable in the manual, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil 305a41dc55 45/49: Add MELPA badges, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil 2fe542cbc6 46/49: Mention Emacs at the beginning of documentation, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil b84cd61eec 40/49: Format .org files consistently, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil a42a778ec3 43/49: Add devil-all-keys-repeatable to changelog, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil 1ddc4dc2e3 44/49: Fix key translation for key vector as Devil key, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil fbc422c666 20/49: Add steps to install Devil from MELPA, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil 2090eb34f4 21/49: Move configuration examples to subsections, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil 92b95191ca 25/49: Remove demo files, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil ef7a7d4c74 29/49: Add 'devil' customisation group,
ELPA Syncer <=
- [nongnu] elpa/devil b3ad615c76 30/49: Fix spacing in documentation strings, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil 1b929b815b 31/49: * devil.el (devil--saved-keys): Assign nil by default, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil eb38e94a8a 47/49: Do not duplicate support section in the manual, ELPA Syncer, 2023/05/15
- [nongnu] elpa/devil d63216f1cd 48/49: Link to HTML manual, ELPA Syncer, 2023/05/15