From af085ef40b961ca3466e8b2dfb7f722573e5a4cc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mattias=20Engdeg=C3=A5rd?= Date: Sat, 21 Dec 2019 18:52:06 +0100 Subject: [PATCH] Use regexp type for regexps in defcustom declarations * lisp/calendar/diary-lib.el (diary-face-attrs): * lisp/cedet/semantic/db-ebrowse.el (semanticdb-ebrowse-file-match): * lisp/cedet/srecode/document.el (srecode-document-autocomment-common-nouns-abbrevs) (srecode-document-autocomment-function-alist) (srecode-document-autocomment-return-first-alist) (srecode-document-autocomment-return-last-alist) (srecode-document-autocomment-param-alist) (srecode-document-autocomment-param-type-alist): * lisp/desktop.el (desktop-clear-preserve-buffers): * lisp/elide-head.el (elide-head-headers-to-hide): * lisp/erc/erc-backend.el (erc-encoding-coding-alist): * lisp/erc/erc-ezbounce.el (erc-ezb-regexp): * lisp/files.el (auto-save-file-name-transforms): * lisp/gnus/deuglify.el (gnus-outlook-deuglify-attrib-cut-regexp) (gnus-outlook-deuglify-attrib-verb-regexp) (gnus-outlook-deuglify-attrib-end-regexp): * lisp/gnus/gnus-fun.el (gnus-x-face-omit-files, gnus-face-omit-files): * lisp/gnus/spam.el (spam-spamassassin-positive-spam-flag-header): * lisp/htmlfontify.el (hfy-src-doc-link-unstyle): * lisp/info-look.el (info-lookup-file-name-alist): * lisp/international/rfc1843.el (rfc1843-newsgroups-regexp): * lisp/mail/feedmail.el (feedmail-queue-slug-suspect-regexp): * lisp/mail/rmail-spam-filter.el (rsf-white-list, rsf-definitions-alist): * lisp/man.el (Man-name-local-regexp): * lisp/net/ange-ftp.el (ange-ftp-dumb-unix-host-regexp): * lisp/net/newst-backend.el (newsticker-auto-mark-filter-list): * lisp/net/rcirc.el (rcirc-authinfo, rcirc-coding-system-alist): * lisp/net/tramp-adb.el (tramp-adb-prompt): * lisp/org/org-agenda.el (org-agenda-hide-tags-regexp) (org-agenda-category-icon-alist): * lisp/org/org-protocol.el (org-protocol-data-separator): * lisp/org/org-table.el (org-table-number-regexp): * lisp/org/ox-latex.el (org-latex-known-warnings): * lisp/progmodes/bug-reference.el (bug-reference-bug-regexp): * lisp/progmodes/hideif.el (hide-ifdef-header-regexp): * lisp/progmodes/idlw-help.el (idlwave-help-doclib-name) (idlwave-help-doclib-keyword): * lisp/progmodes/idlwave.el (idlwave-no-change-comment): * lisp/progmodes/python.el (python-shell-prompt-input-regexps) (python-shell-prompt-output-regexps, python-shell-prompt-regexp) (python-shell-prompt-block-regexp, python-shell-prompt-output-regexp) (python-shell-prompt-pdb-regexp, python-shell-compilation-regexp-alist) (python-pdbtrack-stacktrace-info-regexp): * lisp/progmodes/sql.el (sql-send-terminator, sql-ansi-statement-starters): * lisp/speedbar.el (speedbar-directory-unshown-regexp) (speedbar-file-unshown-regexp): * lisp/textmodes/flyspell.el (flyspell-mark-duplications-exceptions) (flyspell-tex-command-regexp): * lisp/textmodes/paragraphs.el (sentence-end-base): * lisp/textmodes/tildify.el (tildify-pattern, tildify-space-pattern): * lisp/vc/ediff-init.el (ediff-metachars): * lisp/vc/vc-git.el (vc-git-root-log-format): * lisp/vc/vc-hg.el (vc-hg-root-log-format): * lisp/whitespace.el (whitespace-indentation-regexp) (whitespace-space-after-tab-regexp): * lisp/woman.el (woman-manpath-man-regexp) (woman-imenu-generic-expression): Use 'regexp' instead of 'string' as type for values that are regexps in defcustom declarations. --- lisp/calendar/diary-lib.el | 2 +- lisp/cedet/semantic/db-ebrowse.el | 2 +- lisp/cedet/srecode/document.el | 14 +++++++------- lisp/desktop.el | 2 +- lisp/elide-head.el | 4 ++-- lisp/erc/erc-backend.el | 2 +- lisp/erc/erc-ezbounce.el | 2 +- lisp/files.el | 2 +- lisp/gnus/deuglify.el | 6 +++--- lisp/gnus/gnus-fun.el | 4 ++-- lisp/gnus/spam.el | 2 +- lisp/htmlfontify.el | 2 +- lisp/info-look.el | 2 +- lisp/international/rfc1843.el | 2 +- lisp/mail/feedmail.el | 2 +- lisp/mail/rmail-spam-filter.el | 14 +++++++------- lisp/man.el | 2 +- lisp/net/ange-ftp.el | 2 +- lisp/net/newst-backend.el | 2 +- lisp/net/rcirc.el | 8 ++++---- lisp/net/tramp-adb.el | 2 +- lisp/org/org-agenda.el | 4 ++-- lisp/org/org-protocol.el | 2 +- lisp/org/org-table.el | 2 +- lisp/org/ox-latex.el | 2 +- lisp/progmodes/bug-reference.el | 2 +- lisp/progmodes/hideif.el | 2 +- lisp/progmodes/idlw-help.el | 4 ++-- lisp/progmodes/idlwave.el | 2 +- lisp/progmodes/python.el | 16 ++++++++-------- lisp/progmodes/sql.el | 4 ++-- lisp/speedbar.el | 4 ++-- lisp/textmodes/flyspell.el | 4 ++-- lisp/textmodes/paragraphs.el | 2 +- lisp/textmodes/tildify.el | 4 ++-- lisp/vc/ediff-init.el | 2 +- lisp/vc/vc-git.el | 2 +- lisp/vc/vc-hg.el | 2 +- lisp/whitespace.el | 8 ++++---- lisp/woman.el | 4 ++-- 40 files changed, 76 insertions(+), 76 deletions(-) diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 25849627cdd..b20a4c907cf 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -98,7 +98,7 @@ specifies which face attribute (e.g. `:foreground') to modify, or that this is a face (`:face') to apply. TYPE is the type of attribute being applied. Available TYPES (see `diary-attrtype-convert') are: `string', `symbol', `int', `tnil', `stringtnil'." - :type '(repeat (list (string :tag "Regular expression") + :type '(repeat (list (regexp :tag "Regular expression") (integer :tag "Sub-expression") (symbol :tag "Attribute (e.g. :foreground)") (choice (const string :tag "A string") diff --git a/lisp/cedet/semantic/db-ebrowse.el b/lisp/cedet/semantic/db-ebrowse.el index 14ada88612b..958f6ed6401 100644 --- a/lisp/cedet/semantic/db-ebrowse.el +++ b/lisp/cedet/semantic/db-ebrowse.el @@ -74,7 +74,7 @@ By default, include only headers since the semantic use of EBrowse is only for searching via semanticdb, and thus only headers would be searched." :group 'semanticdb - :type 'string) + :type 'regexp) ;;; SEMANTIC Database related Code ;;; Classes: diff --git a/lisp/cedet/srecode/document.el b/lisp/cedet/srecode/document.el index 21acc61fef2..df7bc0aa330 100644 --- a/lisp/cedet/srecode/document.el +++ b/lisp/cedet/srecode/document.el @@ -89,7 +89,7 @@ versions of names. This is an alist with each element of the form: MATCH is a regexp to match in the type field. RESULT is a string." :group 'document - :type '(repeat (cons (string :tag "Regexp") + :type '(repeat (cons (regexp :tag "Regexp") (string :tag "Doc Text")))) (defcustom srecode-document-autocomment-function-alist @@ -145,7 +145,7 @@ see how best to describe what can be returned. Doesn't always work correctly, but that is just because English doesn't always work correctly." :group 'document - :type '(repeat (cons (string :tag "Regexp") + :type '(repeat (cons (regexp :tag "Regexp") (string :tag "Doc Text")))) (defcustom srecode-document-autocomment-common-nouns-abbrevs @@ -176,7 +176,7 @@ versions of names. This is an alist with each element of the form: MATCH is a regexp to match in the type field. RESULT is a string." :group 'document - :type '(repeat (cons (string :tag "Regexp") + :type '(repeat (cons (regexp :tag "Regexp") (string :tag "Doc Text")))) (defcustom srecode-document-autocomment-return-first-alist @@ -193,7 +193,7 @@ This is an alist with each element of the form: MATCH is a regexp to match in the type field. RESULT is a string." :group 'document - :type '(repeat (cons (string :tag "Regexp") + :type '(repeat (cons (regexp :tag "Regexp") (string :tag "Doc Text")))) (defcustom srecode-document-autocomment-return-last-alist @@ -214,7 +214,7 @@ MATCH is a regexp to match in the type field. RESULT is a string, which can contain %s, which is replaced with `match-string' 1." :group 'document - :type '(repeat (cons (string :tag "Regexp") + :type '(repeat (cons (regexp :tag "Regexp") (string :tag "Doc Text")))) (defcustom srecode-document-autocomment-param-alist @@ -234,7 +234,7 @@ RESULT is a string of text to use to describe MATCH. When one is encountered, document-insert-parameters will automatically place this comment after the parameter name." :group 'document - :type '(repeat (cons (string :tag "Regexp") + :type '(repeat (cons (regexp :tag "Regexp") (string :tag "Doc Text")))) (defcustom srecode-document-autocomment-param-type-alist @@ -259,7 +259,7 @@ This is an alist with each element of the form: MATCH is a regexp to match in the type field. RESULT is a string." :group 'document - :type '(repeat (cons (string :tag "Regexp") + :type '(repeat (cons (regexp :tag "Regexp") (string :tag "Doc Text")))) ;;;###autoload diff --git a/lisp/desktop.el b/lisp/desktop.el index 6f45278218c..362a4e825a1 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -344,7 +344,7 @@ to the value obtained by evaluating FORM." Each element is a regular expression. Buffers with a name matched by any of these won't be deleted." :version "23.3" ; added Warnings - bug#6336 - :type '(repeat string) + :type '(repeat regexp) :group 'desktop) ;;;###autoload diff --git a/lisp/elide-head.el b/lisp/elide-head.el index c1678c003db..78197c0b474 100644 --- a/lisp/elide-head.el +++ b/lisp/elide-head.el @@ -64,8 +64,8 @@ elided with an invisible overlay from the end of the line where the first match is found to the end of the match for the corresponding cdr." :group 'elide-head - :type '(alist :key-type (string :tag "Start regexp") - :value-type (string :tag "End regexp"))) + :type '(alist :key-type (regexp :tag "Start regexp") + :value-type (regexp :tag "End regexp"))) (defvar elide-head-overlay nil) (make-variable-buffer-local 'elide-head-overlay) diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index 72a7f86da2f..2ac43e42742 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -375,7 +375,7 @@ Example: If you know that the channel #linux-ru uses the coding-system `cyrillic-koi8', then add (\"#linux-ru\" . cyrillic-koi8) to the alist." :group 'erc-server - :type '(repeat (cons (string :tag "Target") + :type '(repeat (cons (regexp :tag "Target") coding-system))) (defcustom erc-server-connect-function #'erc-open-network-stream diff --git a/lisp/erc/erc-ezbounce.el b/lisp/erc/erc-ezbounce.el index 899ea2f6b5f..b3585c986aa 100644 --- a/lisp/erc/erc-ezbounce.el +++ b/lisp/erc/erc-ezbounce.el @@ -34,7 +34,7 @@ (defcustom erc-ezb-regexp "^ezbounce!srv$" "Regexp used by the EZBouncer to identify itself to the user." :group 'erc-ezbounce - :type 'string) + :type 'regexp) (defcustom erc-ezb-login-alist '() "Alist of logins suitable for the server we're connecting to. diff --git a/lisp/files.el b/lisp/files.el index 059fdbbe371..10dba39f363 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -405,7 +405,7 @@ editing a remote file. On MS-DOS filesystems without long names this variable is always ignored." :group 'auto-save - :type '(repeat (list (string :tag "Regexp") (string :tag "Replacement") + :type '(repeat (list (regexp :tag "Regexp") (string :tag "Replacement") (boolean :tag "Uniquify"))) :initialize 'custom-initialize-delay :version "21.1") diff --git a/lisp/gnus/deuglify.el b/lisp/gnus/deuglify.el index 3bf6a3aa2aa..8f242762376 100644 --- a/lisp/gnus/deuglify.el +++ b/lisp/gnus/deuglify.el @@ -266,21 +266,21 @@ "\\(On \\|Am \\)?\\(Mon\\|Tue\\|Wed\\|Thu\\|Fri\\|Sat\\|Sun\\),[^,]+, " "Regular expression matching the beginning of an attribution line that should be cut off." :version "22.1" - :type 'string + :type 'regexp :group 'gnus-outlook-deuglify) (defcustom gnus-outlook-deuglify-attrib-verb-regexp "wrote\\|writes\\|says\\|schrieb\\|schreibt\\|meinte\\|skrev\\|a écrit\\|schreef\\|escribió" "Regular expression matching the verb used in an attribution line." :version "22.1" - :type 'string + :type 'regexp :group 'gnus-outlook-deuglify) (defcustom gnus-outlook-deuglify-attrib-end-regexp ": *\\|\\.\\.\\." "Regular expression matching the end of an attribution line." :version "22.1" - :type 'string + :type 'regexp :group 'gnus-outlook-deuglify) (defcustom gnus-outlook-display-hook nil diff --git a/lisp/gnus/gnus-fun.el b/lisp/gnus/gnus-fun.el index 8b710512be8..323860bf18c 100644 --- a/lisp/gnus/gnus-fun.el +++ b/lisp/gnus/gnus-fun.el @@ -40,7 +40,7 @@ "Regexp to match faces in `gnus-x-face-directory' to be omitted." :version "25.1" :group 'gnus-fun - :type '(choice (const nil) string)) + :type '(choice (const nil) regexp)) (defcustom gnus-face-directory (expand-file-name "faces" gnus-directory) "Directory where Face PNG files are stored." @@ -52,7 +52,7 @@ "Regexp to match faces in `gnus-face-directory' to be omitted." :version "25.1" :group 'gnus-fun - :type '(choice (const nil) string)) + :type '(choice (const nil) regexp)) (defcustom gnus-convert-pbm-to-x-face-command "pbmtoxbm %s | compface" "Command for converting a PBM to an X-Face." diff --git a/lisp/gnus/spam.el b/lisp/gnus/spam.el index 83df2f6198f..e7a63d278e7 100644 --- a/lisp/gnus/spam.el +++ b/lisp/gnus/spam.el @@ -579,7 +579,7 @@ This must be a list. For example, `(\"-C\" \"configfile\")'." (defcustom spam-spamassassin-positive-spam-flag-header "YES" "The regex on `spam-spamassassin-spam-flag-header' for positive spam identification." - :type 'string + :type 'regexp :group 'spam-spamassassin) (defcustom spam-spamassassin-spam-status-header "X-Spam-Status" diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el index 481b14738bc..6b88ea9d730 100644 --- a/lisp/htmlfontify.el +++ b/lisp/htmlfontify.el @@ -197,7 +197,7 @@ It takes only one argument, the filename." "Regex to remove from the `