From: Michael Eliachevitch <m.eliachevitch@posteo.de>
I recently switched my init from `setq` to the new `setopt` command in Emacs 29
and got type warnings because I set `detached-terminal-data-command` to
`gnu/linux` but it expected a string. Opened the file when doing `M-x
byte-compile-file`, I noticed a bunch of other wrong types giving warnings.
Where possible I used specific types like `const` and `repeat` which also have
the side effect for allowing for nice interactive customization using dropdown
menus and add/delete buttons when using `M-x customize-group detached`
---
detached.el | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/detached.el b/detached.el
index e139639..31cab6f 100644
--- a/detached.el
+++ b/detached.el
@@ -119,12 +119,17 @@ Acceptable values are
- `darwin'
- a custom string
"
- :type 'string
+ :type '(choice
+ (choice :tag "Choose command from system type"
+ (const :tag "Unset (please change)" nil)
+ (const :tag "GNU/Linux" gnu/linux)
+ (const :tag "Darwin" darwin))
+ (string :tag "Custom command"))
:group 'detached)
(defcustom detached-plain-text-commands nil
"A list of regexps for commands to run in plain-text mode."
- :type 'list
+ :type '(repeat regexp)
:group 'detached)
(defcustom detached-annotation-format
@@ -171,7 +176,7 @@ Acceptable values are
If set to a non nil value the latest entry to
`detached-shell-command-history' will be used as the initial input in
`detached-shell-command' when it is used as a command."
- :type 'bool
+ :type 'boolean
:group 'detached)
(defcustom detached-degraded-commands nil
@@ -191,7 +196,7 @@ If set to a non nil value the latest entry to
(defcustom detached-filter-ansi-sequences t
"Variable to instruct `detached' to use `ansi-filter'."
- :type 'bool
+ :type 'boolean
:group 'detached)
(defcustom detached-log-mode-hook '()
@@ -203,7 +208,7 @@ If set to a non nil value the latest entry to
'(detached--env-message-filter
detached--dtach-eof-message-filter)
"A list of filter functions that are run in `detached-shell-mode'."
- :type 'list
+ :type '(repeat function)
:group 'detached)
(defcustom detached-dtach-socket-creation-delay 1.0
--
2.38.5