From ff2a02afa63e2e12842c8ebde9274aed5e7b7182 Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Mon, 25 Sep 2023 20:38:23 +0200 Subject: [PATCH] Address defcustom :type warnings * lisp/calendar/diary-lib.el (diary-display-function): * lisp/calendar/icalendar.el (icalendar-export-alarms): * lisp/emacs-lisp/elint.el (elint-ignored-warnings): * lisp/mail/sendmail.el (send-mail-function): * lisp/net/gnutls.el (gnutls-verify-error): * lisp/gnus/mm-decode.el (mm-text-html-renderer): * lisp/gnus/message.el (message-send-mail-function): Fix misplaced defcustom :tags (bug#66196). (message-tool-bar): Remove duplicate, overwritten, and nonexistent defcustom :type gmm-tool-bar-list-item. * lisp/progmodes/idlwave.el (idlwave-begin-line-comment): Strip excessive defcustom :type quoting. * lisp/progmodes/ps-mode.el (ps-mode-paper-size): Consolidate paper sizes with same dimensions into a single defcustom menu entry. * lisp/textmodes/glyphless-mode.el (glyphless-mode-types): Remove duplicate defcustom :type choice. --- lisp/calendar/diary-lib.el | 4 ++-- lisp/calendar/icalendar.el | 4 ++-- lisp/emacs-lisp/elint.el | 20 ++++++++++---------- lisp/gnus/message.el | 9 +++------ lisp/gnus/mm-decode.el | 6 +++--- lisp/mail/sendmail.el | 10 +++++----- lisp/net/gnutls.el | 2 +- lisp/progmodes/idlwave.el | 2 +- lisp/progmodes/ps-mode.el | 6 ++---- lisp/textmodes/glyphless-mode.el | 1 - 10 files changed, 29 insertions(+), 35 deletions(-) diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 946cf0e7236..0d894f10013 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -167,8 +167,8 @@ form of ((MONTH DAY YEAR) STRING), where string is the diary entry for the given date. This can be used, for example, to produce a different buffer for display (perhaps combined with holidays), or hard copy output." - :type '(choice (const diary-fancy-display :tag "Fancy display") - (const diary-simple-display :tag "Basic display") + :type '(choice (const :tag "Fancy display" diary-fancy-display) + (const :tag "Basic display" diary-simple-display) (const :tag "No display" ignore) (function :tag "User-specified function")) :initialize 'custom-initialize-default diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el index e51251d6d9f..51e6a7d1170 100644 --- a/lisp/calendar/icalendar.el +++ b/lisp/calendar/icalendar.el @@ -276,9 +276,9 @@ other sexp entries are enumerated in any case." :value 10) (set :tag "Alarm type" (list :tag "Audio" - (const audio :tag "Audio")) + (const :tag "Audio" audio)) (list :tag "Display" - (const display :tag "Display")) + (const :tag "Display" display)) (list :tag "Email" (const email) (repeat :tag "Attendees" diff --git a/lisp/emacs-lisp/elint.el b/lisp/emacs-lisp/elint.el index 9812c663ea8..700f007d6b4 100644 --- a/lisp/emacs-lisp/elint.el +++ b/lisp/emacs-lisp/elint.el @@ -79,16 +79,16 @@ are as follows, and suppress messages about the indicated features: empty-let - let-bindings with empty variable lists" :type '(choice (const :tag "Don't suppress any warnings" nil) (repeat :tag "List of issues to ignore" - (choice (const undefined-functions - :tag "Calls to unknown functions") - (const unbound-reference - :tag "Reference to unknown variables") - (const unbound-assignment - :tag "Assignment to unknown variables") - (const macro-expansion - :tag "Failure to expand macros") - (const empty-let - :tag "Let-binding with empty varlist")))) + (choice (const :tag "Calls to unknown functions" + undefined-functions) + (const :tag "Reference to unknown variables" + unbound-reference) + (const :tag "Assignment to unknown variables" + unbound-assignment) + (const :tag "Failure to expand macros" + macro-expansion) + (const :tag "Let-binding with empty varlist" + empty-let)))) :safe (lambda (value) (or (null value) (and (listp value) (equal value diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index b6b9927a788..969589bb942 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -747,16 +747,14 @@ default is system dependent and determined by the function `message-send-mail-function'. See also `send-mail-function'." - :type '(radio (function-item message--default-send-mail-function - :tag "Use send-mail-function") + :type '(radio (function-item message--default-send-mail-function) (function-item message-send-mail-with-sendmail) (function-item message-send-mail-with-mh) (function-item message-send-mail-with-qmail) (function-item message-smtpmail-send-it) - (function-item smtpmail-send-it) + (function-item :doc "Use SMTPmail package." smtpmail-send-it) (function-item feedmail-send-it) - (function-item message-send-mail-with-mailclient - :tag "Use Mailclient package") + (function-item message-send-mail-with-mailclient) (function :tag "Other")) :group 'message-sending :version "27.1" @@ -8210,7 +8208,6 @@ which specify the range to operate on." It can be either a list or a symbol referring to a list. See `gmm-tool-bar-from-list' for the format of the list. The default key map is `message-mode-map'." - :type '(repeat gmm-tool-bar-list-item) :type '(choice (repeat :tag "User defined list" gmm-tool-bar-item) (symbol)) :version "29.1" diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index b9beedf6c5c..3c7d1e7e073 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -119,7 +119,7 @@ ((executable-find "links") 'links) ((executable-find "lynx") 'lynx) (t 'shr)) - "Render of HTML contents. + "Renderer of HTML contents. It is one of defined renderer types, or a rendering function. The defined renderer types are: `shr': use the built-in Gnus HTML renderer; @@ -131,8 +131,8 @@ The defined renderer types are: :version "29.1" :type '(choice (const shr) (const gnus-w3m) - (const w3m :tag "emacs-w3m") - (const w3m-standalone :tag "standalone w3m" ) + (const :tag "emacs-w3m" w3m) + (const :tag "standalone w3m" w3m-standalone) (const links) (const lynx) (function)) diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 8d7e90ccacf..8306bd3b30c 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -151,11 +151,11 @@ not a valid RFC 822 (or later) header or continuation line, that matches the variable `mail-header-separator'. This is used by the default mail-sending commands. See also `message-send-mail-function' for use with the Message package." - :type '(radio (function-item sendmail-send-it :tag "Use Sendmail package") - (function-item sendmail-query-once :tag "Query the user") - (function-item smtpmail-send-it :tag "Use SMTPmail package") - (function-item feedmail-send-it :tag "Use Feedmail package") - (function-item mailclient-send-it :tag "Use Mailclient package") + :type '(radio (function-item sendmail-send-it) + (function-item sendmail-query-once) + (function-item :doc "Use SMTPmail package." smtpmail-send-it) + (function-item feedmail-send-it) + (function-item mailclient-send-it) function) :version "24.1") diff --git a/lisp/net/gnutls.el b/lisp/net/gnutls.el index 36b1654222a..955172d8bb6 100644 --- a/lisp/net/gnutls.el +++ b/lisp/net/gnutls.el @@ -96,7 +96,7 @@ Security'." (repeat :tag "List of hostname regexps with flags for each" (list (choice :tag "Hostname" - (const ".*" :tag "Any hostname") + (const :tag "Any hostname" ".*") regexp) (set (const :trustfiles) (const :hostname)))))) diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index 54c758c6a8a..d9eccacc48b 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el @@ -309,7 +309,7 @@ beginning with a \";\". Expressions for comments at the beginning of the line should begin with \"^\"." :group 'idlwave-code-formatting :type '(choice (const :tag "Any line beginning with `;'" nil) - 'regexp)) + regexp)) (defcustom idlwave-code-comment ";;[^;]" "A comment that starts with this regular expression on a line by diff --git a/lisp/progmodes/ps-mode.el b/lisp/progmodes/ps-mode.el index 1147db816bb..01a075d6512 100644 --- a/lisp/progmodes/ps-mode.el +++ b/lisp/progmodes/ps-mode.el @@ -97,11 +97,9 @@ When the figure is finished these values should be replaced." (const :tag "archC" (1296 1728)) (const :tag "archB" (864 1296)) (const :tag "archA" (648 864)) - (const :tag "flsa" (612 936)) - (const :tag "flse" (612 936)) + (const :tag "flsa, flse" (612 936)) (const :tag "halfletter" (396 612)) - (const :tag "11x17" (792 1224)) - (const :tag "tabloid" (792 1224)) + (const :tag "11x17, tabloid" (792 1224)) (const :tag "ledger" (1224 792)) (const :tag "csheet" (1224 1584)) (const :tag "dsheet" (1584 2448)) diff --git a/lisp/textmodes/glyphless-mode.el b/lisp/textmodes/glyphless-mode.el index 99bbb2769e4..eb4447f3048 100644 --- a/lisp/textmodes/glyphless-mode.el +++ b/lisp/textmodes/glyphless-mode.el @@ -30,7 +30,6 @@ The value can be any of the groups supported by `all', for all glyphless characters." :version "29.1" :type '(repeat (choice (const :tag "All" all) - (const :tag "No font" no-font) (const :tag "C0 Control" c0-control) (const :tag "C1 Control" c1-control) (const :tag "Format Control" format-control) -- 2.39.2