Skip to content

Commit 523f51b

Browse files
authored
Merge pull request Fuco1#201 from RuijieYu/fix-defcustom-types
Fixes on defcustom types
2 parents 1596e51 + 445ad2c commit 523f51b

File tree

8 files changed

+22
-23
lines changed

8 files changed

+22
-23
lines changed

dired-avfs.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@
6969
7070
For example, this allows the user to open files via avfs from
7171
dired, but not from `find-file'."
72-
:type '(repeat symbol)
72+
:type '(repeat function)
7373
:group 'dired-avfs)
7474

7575
(defcustom dired-avfs-file-size-threshold 100
7676
"Ask before opening files if their size exceeds this setting.
7777
7878
The value is in megabytes."
79-
:type 'integer
79+
:type 'number
8080
:group 'dired-avfs)
8181

8282
(defun dired-avfs--archive-filename (filename)

dired-hacks-utils.el

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@
4747
:group 'dired
4848
:prefix "dired-hacks-")
4949

50-
(defcustom dired-hacks-file-size-formatter 'file-size-human-readable
50+
(defcustom dired-hacks-file-size-formatter #'file-size-human-readable
5151
"The function used to format file sizes.
5252
5353
See `dired-utils-format-file-sizes'."
54-
:type 'symbol
54+
:type 'function
5555
:group 'dired-hacks)
5656

5757
(defcustom dired-hacks-datetime-regexp
@@ -65,7 +65,7 @@ followed by at least one space character. You should only use
6565
shy groups (prefixed with ?:) because the first group is used by
6666
the font-lock to determine what portion of the name should be
6767
colored."
68-
:type 'string
68+
:type 'regexp
6969
:group 'dired-hacks)
7070

7171
(defalias 'dired-utils--string-trim

dired-images.el

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,22 @@
1919

2020
(defcustom di-thumb-relief 2
2121
""
22-
:type 'integer
22+
:type 'natnum
2323
)
2424

2525
(defcustom di-thumb-margin 3
2626
""
27-
:type 'integer
27+
:type 'natnum
2828
)
2929

3030
(defcustom di-thumb-width 200
3131
""
32-
:type 'integer
32+
:type 'natnum
3333
)
3434

3535
(defcustom di-thumb-height 115
3636
""
37-
:type 'integer
37+
:type 'natnum
3838
)
3939

4040
(defcustom di-thumb-track t

dired-list.el

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
(require 'grep)
6868
(require 'find-dired)
6969

70+
; TODO: this will become obsolete in 30.1, because -N always comes with --dired flag
7071
(defcustom dired-list-use-N-flag t
7172
"Non-nil means the --literal flag will be used.
7273

dired-narrow.el

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,14 @@ exit minibuffer and call `dired-narrow-exit-action'."
106106
:group 'dired-narrow)
107107

108108
(defcustom dired-narrow-enable-blinking t
109-
"If set to true highlight the chosen file shortly.
110-
This feature works only when `dired-narrow-exit-when-one-left' is true."
109+
"If non-nil, highlight the chosen file shortly.
110+
Only works when `dired-narrow-exit-when-one-left' is non-nil."
111111
:type 'boolean
112112
:group 'dired-narrow)
113113

114114
(defcustom dired-narrow-blink-time 0.2
115-
"How long should be highlighted a chosen file.
116-
Units are seconds."
117-
:type 'float
115+
"How many seconds should a chosen file be highlighted."
116+
:type 'number
118117
:group 'dired-narrow)
119118

120119
(defface dired-narrow-blink

dired-open.el

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,18 +80,17 @@
8080
(defcustom dired-open-functions '(dired-open-by-extension dired-open-subdir)
8181
"List of functions to try to open a file.
8282
83-
Each function should accept no argument and should retrieve the
83+
Each function should accept no arguments and should retrieve the
8484
filename and/or other context by itself. Each function should
8585
return non-nil value if it succeeded in opening the file."
8686
:type 'hook
8787
:group 'dired-open)
8888

89-
(defcustom dired-open-find-file-function 'dired-find-file
89+
(defcustom dired-open-find-file-function #'dired-find-file
9090
"A function that will be used if none of the `dired-open-functions' succeeded."
9191
:type 'function
9292
:group 'dired-open)
9393

94-
9594
(defcustom dired-open-extensions nil
9695
"Alist of extensions mapping to a programs to run them in.
9796
@@ -111,16 +110,16 @@ The filename is passed as the only argument to the function."
111110
:group 'dired-open)
112111

113112
(defcustom dired-open-use-nohup t
114-
"If non-nil, use nohup(1) to keep external processes opened
115-
even if emacs process is terminated.
113+
"If non-nil, use nohup to keep external processes alive.
114+
See man page `nohup(1)'.
116115
117116
This only affects the built-in handlers."
118117
:type 'boolean
119118
:group 'dired-open)
120119

121120
(defcustom dired-open-query-before-exit t
122121
"If non-nil, ask the user if they want to kill any external
123-
processes started by `dired-open-file' when they exit emacs.
122+
processes started by `dired-open-file' when they exit Emacs.
124123
125124
This only affects the built-in handlers."
126125
:type 'boolean

dired-ranger.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
;; multi-stage copy/paste operations
100100
(defcustom dired-ranger-copy-ring-size 10
101101
"Specifies how many filesets for copy/paste operations should be stored."
102-
:type 'integer
102+
:type 'natnum
103103
:group 'dired-ranger)
104104

105105
(defvar dired-ranger-copy-ring (make-ring dired-ranger-copy-ring-size))

dired-subtree.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,13 @@ depth---that creates the prefix."
127127

128128
(defcustom dired-subtree-cycle-depth 3
129129
"Default depth expanded by `dired-subtree-cycle'."
130-
:type 'integer
130+
:type 'natnum
131131
:group 'dired-subtree)
132132

133133
(defcustom dired-subtree-ignored-regexp
134134
(concat "^" (regexp-opt vc-directory-exclusion-list) "$")
135135
"Matching directories will not be expanded in `dired-subtree-cycle'."
136-
:type 'string
136+
:type 'regexp
137137
:group 'dired-subtree)
138138

139139
(defgroup dired-subtree-faces ()

0 commit comments

Comments
 (0)