Skip to content

Commit 72d6ff3

Browse files
ceed0eshrh
authored andcommitted
fix customization declarations
1 parent 0f85569 commit 72d6ff3

File tree

1 file changed

+26
-17
lines changed

1 file changed

+26
-17
lines changed

meow-var.el

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ This will affect how selection is displayed."
4444
'(markdown-mode org-mode)
4545
"A list of major modes where after command expand should be disabled."
4646
:group 'meow
47-
:type 'list)
47+
:type '(repeat sexp))
4848

4949
(defcustom meow-selection-command-fallback
5050
'((meow-change . meow-change-char)
@@ -54,7 +54,8 @@ This will affect how selection is displayed."
5454
(meow-beacon-change . meow-beacon-change-char))
5555
"Fallback commands for selection commands when there is no available selection."
5656
:group 'meow
57-
:type 'list)
57+
:type '(alist :key-type (function :tag "Command")
58+
:key-value (function :tag "Fallback")))
5859

5960
(defcustom meow-replace-state-name-list
6061
'((normal . "NORMAL")
@@ -64,7 +65,8 @@ This will affect how selection is displayed."
6465
(beacon . "BEACON"))
6566
"A list of mappings for how to display state in indicator."
6667
:group 'meow
67-
:type 'list)
68+
:type '(alist :key-type (symbol :tag "Meow state")
69+
:key-value (string :tag "Indicator")))
6870

6971
(defcustom meow-select-on-change t
7072
"Whether to activate region when exiting INSERT mode
@@ -75,7 +77,7 @@ This will affect how selection is displayed."
7577
(defcustom meow-expand-hint-remove-delay 1.0
7678
"The delay before the position hint disappears."
7779
:group 'meow
78-
:type 'integer)
80+
:type 'number)
7981

8082
(defcustom meow-expand-hint-counts
8183
'((word . 30)
@@ -85,7 +87,8 @@ This will affect how selection is displayed."
8587
(till . 30))
8688
"The maximum numbers for expand hints of each type."
8789
:group 'meow
88-
:type 'integer)
90+
:type '(alist :key-type (symbol :tag "Hint type")
91+
:key-value (integer :tag "Value")))
8992

9093
(defcustom meow-keypad-message t
9194
"Whether to log keypad messages in minibuffer."
@@ -106,7 +109,8 @@ This will affect how selection is displayed."
106109
(?. . sentence))
107110
"Mapping from char to thing."
108111
:group 'meow
109-
:type 'list)
112+
:type '(alist :key-type (character :tag "Char")
113+
:key-value (symbol :tag "Thing")))
110114

111115
(defcustom meow-thing-selection-directions
112116
'((inner . forward)
@@ -115,7 +119,8 @@ This will affect how selection is displayed."
115119
(end . forward))
116120
"Selection directions for each thing command."
117121
:group 'meow
118-
:type 'list)
122+
:type '(alist :key-type (symbol :tag "Command")
123+
:key-value (symbol :tag "Direction")))
119124

120125
(defcustom meow-display-thing-help t
121126
"Whether to display the help prompt for meow-inner/bounds/begin/end-of-thing."
@@ -126,13 +131,13 @@ This will affect how selection is displayed."
126131
0.5
127132
"The delay in seconds before popup keybinding descriptions appear."
128133
:group 'meow
129-
:type 'float)
134+
:type 'number)
130135

131136
(defcustom meow-grab-fill-commands
132137
'(meow-query-replace meow-query-replace-regexp)
133138
"A list of commands that meow will auto fill with grabbed content."
134139
:group 'meow
135-
:type 'list)
140+
:type '(repeat function))
136141

137142
(defcustom meow-visit-collect-min-length 1
138143
"Minimal length when collecting symbols for `meow-visit'."
@@ -195,7 +200,8 @@ This option will affect the color of position hint and fake region cursor."
195200
The init-state can only be `motion' or `normal',
196201
and `motion' have a higher priority."
197202
:group 'meow
198-
:type 'list)
203+
:type '(alist :key-type (sexp :tag "Major-mode")
204+
:value-type (symbol :tag "Initial state")))
199205

200206
(defcustom meow-update-display-in-macro 'except-last-macro
201207
"Whether update cursor and mode-line when executing kbd macro.
@@ -209,14 +215,14 @@ for no update only when executing last macro.
209215
Set to `t' to always update.
210216
"
211217
:group 'meow
212-
:options '(t nil except-last-macro)
213-
:type 'symbol)
218+
:type '(choice boolean
219+
(const except-last-macro)))
214220

215221
(defcustom meow-expand-selection-type 'select
216222
"Whether to create transient selection for expand commands."
217223
:group 'meow
218-
:options '(select expand)
219-
:type 'symbol)
224+
:type '(choice (const select)
225+
(const expand)))
220226

221227
(defcustom meow-keypad-leader-dispatch nil
222228
"The fallback dispatching in KEYPAD when there's no translation.
@@ -226,7 +232,9 @@ A keymap stands for a base keymap used for further translation.
226232
A string stands for finding the keymap at a specified key binding.
227233
Nil stands for taking leader keymap from `meow-keymap-alist'."
228234
:group 'meow
229-
:type '(choice string keymap nil))
235+
:type '(choice (string :tag "Keys")
236+
(variable :tag "Keymap")
237+
(const nil)))
230238

231239
(defcustom meow-keypad-meta-prefix ?m
232240
"The prefix represent M- in KEYPAD state."
@@ -251,7 +259,8 @@ Nil stands for taking leader keymap from `meow-keymap-alist'."
251259
it's corresponding value is appended to C- and the user is
252260
prompted to finish the command."
253261
:group 'meow
254-
:type 'alist)
262+
:type '(alist :key-type (character :tag "From")
263+
:value-type (character :tag "To")))
255264

256265
(defcustom meow-motion-remap-prefix "H-"
257266
"The prefix string used when remapping an occupied key in MOTION state.
@@ -267,7 +276,7 @@ For examples:
267276
268277
Nil means find the command by key binding."
269278
:group 'meow
270-
:type 'function)
279+
:type '(choice function (const nil)))
271280

272281
(defvar meow-state-mode-alist
273282
'((normal . meow-normal-mode)

0 commit comments

Comments
 (0)