2015-09-17 Paul Eggert <eggert@cs.ucla.edu>
+ Backslash cleanup in Elisp source files
+
+ This patch should not change behavior. It typically omits backslashes
+ where they are redundant (e.g., in the string literal "^\$").
+ In a few places, insert backslashes where they make regular expressions
+ clearer: e.g., replace "^\*" (equivalent to "^*") with "^\\*", which
+ has the same effect as a regular expression.
+ Also, use ‘\ %’ instead of ‘\%’ when avoiding confusion with SCCS IDs,
+ and similarly use ‘\ $’ instead of ‘\$’ when avoiding confusion
+ with RCS IDs, as that makes it clearer that the backslash is intended.
+ * auth-source.el (auth-source-secrets-search)
+ (auth-source-macos-keychain-search):
+ * gnus-art.el (gnus-mime-action-on-part)
+ (gnus-mime-display-multipart-related-as-mixed)
+ (gnus-button-mid-or-mail-heuristic-alist)
+ (gnus-button-mid-or-mail-heuristic, gnus-article-extend-url-button):
+ * gnus-bookmark.el (gnus-bookmark-bmenu-toggle-infos)
+ (gnus-bookmark-bookmark-inline-details, gnus-bookmark-bookmark-details)
+ (gnus-bookmark-alist, gnus-bookmark-name-from-full-record)
+ (gnus-bookmark-bmenu-mode, gnus-bookmark-delete):
+ * gnus-cus.el (gnus-group-customize):
+ * gnus-group.el (gnus-group-line-format, gnus-group-mode-line-format)
+ (gnus-group-jump-to-group-prompt, gnus-group-name-at-point):
+ * gnus-mlspl.el (gnus-group-split-fancy):
+ * gnus-registry.el (gnus-registry-prune-factor):
+ * gnus-salt.el (gnus-summary-pick-line-format):
+ * gnus-sieve.el (gnus-sieve-update, gnus-sieve-generate)
+ (gnus-sieve-script):
+ * gnus-util.el (gnus-directory-sep-char-regexp):
+ * gnus.el (gnus-message-archive-group, gnus-user-agent):
+ * message.el (message-archive-header, message-reply-headers)
+ (message-send-method-alist):
+ * mm-decode.el (mm-add-meta-html-tag):
+ * nndoc.el (nndoc-generate-lanl-gov-head):
+ * nnheader.el (nnheader-max-head-length):
+ * registry.el (registry-db, registry-prune):
+ * rfc1843.el (rfc1843-hzp-word-regexp)
+ (rfc1843-hzp-word-regexp-strictly):
+ * rfc2047.el (rfc2047-encoded-word-regexp)
+ (rfc2047-encoded-word-regexp-loose):
+
+ Fix several backslash typos in Elisp strings
* gnus-art.el (gnus-button-handle-library):
* gnus-group.el (gnus-read-ephemeral-gmane-group-url):
* nntp.el (nntp-via-shell-prompt, nntp-telnet-shell-prompt):
Here's an example that looks for the first item in the `Login'
Secrets collection:
- \(let ((auth-sources \\='(\"secrets:Login\")))
+ (let ((auth-sources \\='(\"secrets:Login\")))
(auth-source-search :max 1)
Here's another that looks for the first item in the `Login'
Secrets collection whose label contains `gnus':
- \(let ((auth-sources \\='(\"secrets:Login\")))
+ (let ((auth-sources \\='(\"secrets:Login\")))
(auth-source-search :max 1 :label \"gnus\")
And this one looks for the first item in the `Login' Secrets
collection that's a Google Chrome entry for the git.gnus.org site
authentication tokens:
- \(let ((auth-sources \\='(\"secrets:Login\")))
+ (let ((auth-sources \\='(\"secrets:Login\")))
(auth-source-search :max 1 :signon_realm \"https://git.gnus.org/Git\"))
"
Here's an example that looks for the first item in the default
generic MacOS Keychain:
- \(let ((auth-sources \\='(macos-keychain-generic)))
+ (let ((auth-sources \\='(macos-keychain-generic)))
(auth-source-search :max 1)
Here's another that looks for the first item in the internet
MacOS Keychain collection whose label is `gnus':
- \(let ((auth-sources \\='(macos-keychain-internet)))
+ (let ((auth-sources \\='(macos-keychain-internet)))
(auth-source-search :max 1 :label \"gnus\")
And this one looks for the first item in the internet keychain
entries for git.gnus.org:
- \(let ((auth-sources \\='(macos-keychain-internet\")))
+ (let ((auth-sources \\='(macos-keychain-internet\")))
(auth-source-search :max 1 :host \"git.gnus.org\"))
"
;; TODO
(mm-display-part handle nil t))))))
(defun gnus-mime-action-on-part (&optional action)
- "Do something with the MIME attachment at \(point\)."
+ "Do something with the MIME attachment at (point)."
(interactive
(list (gnus-completing-read "Action" (mapcar 'car gnus-mime-action-alist) t)))
(gnus-article-check-buffer)
"Display \"multipart/related\" parts as \"multipart/mixed\".
If displaying \"text/html\" is discouraged \(see
-`mm-discouraged-alternatives'\) images or other material inside a
+`mm-discouraged-alternatives') images or other material inside a
\"multipart/related\" part might be overlooked when this variable is nil."
:version "22.1"
:group 'gnus-article-mime
(10.0 . "^[^0-9]+@")
(3.0 . "^[^0-9]+[0-9][0-9]?[0-9]?@")
;; ^[^0-9]+[0-9]{1,3}\@ digits only at end of local part
- (3.0 . "\@stud")
+ (3.0 . "@stud")
;;
(2.0 . "[a-z][a-z][._-][A-Z][a-z].*@")
;;
(0.5 . "^[A-Z][a-z][a-z]")
(1.5 . "^[A-Z][a-z][A-Z][a-z][^a-z]") ;; ^[A-Z][a-z]{3,3}
(2.0 . "^[A-Z][a-z][A-Z][a-z][a-z][^a-z]")) ;; ^[A-Z][a-z]{4,4}
- "An alist of \(RATE . REGEXP\) pairs for `gnus-button-mid-or-mail-heuristic'.
+ "An alist of (RATE . REGEXP) pairs for `gnus-button-mid-or-mail-heuristic'.
A negative RATE indicates a message IDs, whereas a positive indicates a mail
address. The REGEXP is processed with `case-fold-search' set to nil."
(gnus-message
9 "Many digits in `%s', rate `%s', result `%s'."
mid-or-mail rate result))
- ((string-match "[^aeiouy][^aeiouy][^aeiouy][^aeiouy]+.*\@"
+ ((string-match "[^aeiouy][^aeiouy][^aeiouy][^aeiouy]+.*@"
mid-or-mail)
- ;; Too few vowels [^aeiouy]{4,}.*\@
+ ;; Too few vowels [^aeiouy]{4,}.*@
(setq result (+ result -5.0))
(gnus-message
9 "Few vowels in `%s', rate `%s', result `%s'."
(< (match-end 0) start))
(regexp-quote (match-string 0)))
"\
-\[\t ]*\\(?:\\([^\t\n \">]+\\)[\t ]*$\\|\\([^\t\n \">]*\\)[\t ]*"
+[\t ]*\\(?:\\([^\t\n \">]+\\)[\t ]*$\\|\\([^\t\n \">]*\\)[\t ]*"
delim "\\)"))
(while (progn
(forward-line 1)
This may result in truncated bookmark names. To disable this, put the
following in your `.emacs' file:
-\(setq gnus-bookmark-bmenu-toggle-infos nil\)"
+\(setq gnus-bookmark-bmenu-toggle-infos nil)"
:type 'boolean
:group 'gnus-bookmark)
(defcustom gnus-bookmark-bookmark-inline-details '(author)
"Details to be shown with `gnus-bookmark-bmenu-toggle-infos'.
-The default value is \(subject\)."
+The default value is \(subject)."
:type '(list :tag "Gnus bookmark details"
(set :inline t
(const :tag "Author" author)
(defcustom gnus-bookmark-bookmark-details
'(author subject date group annotation)
"Details to be shown with `gnus-bookmark-bmenu-show-details'.
-The default value is \(author subject date group annotation\)."
+The default value is \(author subject date group annotation)."
:type '(list :tag "Gnus bookmark details"
(set :inline t
(const :tag "Author" author)
"Association list of Gnus bookmarks and their records.
The format of the alist is
- \(BMK1 BMK2 ...\)
+ (BMK1 BMK2 ...)
where each BMK is of the form
\(NAME
- \(group . GROUP\)
- \(message-id . MESSAGE-ID\)
- \(author . AUTHOR\)
- \(date . DATE\)
- \(subject . SUBJECT\)
- \(annotation . ANNOTATION\)\)
+ (group . GROUP)
+ (message-id . MESSAGE-ID)
+ (author . AUTHOR)
+ (date . DATE)
+ (subject . SUBJECT)
+ (annotation . ANNOTATION))
So the cdr of each bookmark is an alist too.")
(car (cdr (gnus-bookmark-get-bookmark bookmark))))
(defun gnus-bookmark-name-from-full-record (full-record)
- "Return name of FULL-RECORD \(an alist element instead of a string\)."
+ "Return name of FULL-RECORD (an alist element instead of a string)."
(car full-record))
(defvar gnus-bookmark-bmenu-bookmark-column nil)
Also show bookmarks marked using m in other windows.
\\[gnus-bookmark-bmenu-toggle-infos] -- toggle displaying of details (they may obscure long bookmark names).
\\[gnus-bookmark-bmenu-locate] -- display (in minibuffer) location of this bookmark.
-\\[gnus-bookmark-bmenu-rename] -- rename this bookmark \(prompts for new name\).
+\\[gnus-bookmark-bmenu-rename] -- rename this bookmark (prompts for new name).
\\[gnus-bookmark-bmenu-delete] -- mark this bookmark to be deleted, and move down.
\\[gnus-bookmark-bmenu-delete-backwards] -- mark this bookmark to be deleted, and move up.
\\[gnus-bookmark-bmenu-execute-deletions] -- delete bookmarks marked with `\\[gnus-bookmark-bmenu-delete]'.
Removes only the first instance of a bookmark with that name. If
there are one or more other bookmarks with the same name, they will
not be deleted. Defaults to the \"current\" bookmark \(that is, the
-one most recently used in this file, if any\).
+one most recently used in this file, if any).
Optional second arg BATCH means don't update the bookmark list buffer,
probably because we were called from there."
(gnus-bookmark-maybe-load-default-file)
:greedy t
:tag "Agent Parameters"
:format "%t:\n%h%v"
- :doc "\ These agent parameters are
+ :doc "These agent parameters are
recognized by Gnus. They control article selection and expiration for
use in the unplugged cache. Check the [ ] for the parameters you want
to apply to this group or to the groups in this topic, then edit the
(function-item gnus-group-sort-by-rank)
(function :tag "other" nil))))
-(defcustom gnus-group-line-format "%M\%S\%p\%P\%5y:%B%(%g%)\n"
+(defcustom gnus-group-line-format "%M\ %S\ %p\ %P\ %5y:%B%(%g%)\n"
"*Format of group lines.
It works along the same lines as a normal formatting string,
with some simple extensions.
:group 'gnus-group-visual
:type 'string)
-(defcustom gnus-group-mode-line-format "Gnus: %%b {%M\%:%S}"
+(defcustom gnus-group-mode-line-format "Gnus: %%b {%M\ %:%S}"
"*The format specification for the group mode line.
It works along the same lines as a normal formatting string,
with some simple extensions:
e.g. \"nnml:\", in which case `gnus-group-jump-to-group' offers \"Group:
nnml:\" in the minibuffer prompt.
-If it is an alist, it must consist of \(NUMBER . PROMPT\) pairs, for example:
+If it is an alist, it must consist of \(NUMBER . PROMPT) pairs, for example:
\((1 . \"\") (2 . \"nnfolder+archive:\")). The element with number 0 is
used when no prefix argument is given to `gnus-group-jump-to-group'."
:version "22.1"
(gnus-group-decoded-name group)))
(let ((regexp "[][\C-@-\t\v-*,/:-@\\^`{-\C-?]*\
\\(nn[a-z]+\\(?:\\+[^][\C-@-*,/:-@\\^`{-\C-?]+\\)?:\
-\[^][\C-@-*,./:-@\\^`{-\C-?]+\\(?:\\.[^][\C-@-*,./:-@\\^`{-\C-?]+\\)*\
+[^][\C-@-*,./:-@\\^`{-\C-?]+\\(?:\\.[^][\C-@-*,./:-@\\^`{-\C-?]+\\)*\
\\|[^][\C-@-*,./:-@\\^`{-\C-?]+\\(?:\\.[^][\C-@-*,./:-@\\^`{-\C-?]+\\)+\\)")
(start (point))
(case-fold-search nil))
"Uses information from group parameters in order to split mail.
It can be embedded into `nnmail-split-fancy' lists with the SPLIT
-\(: gnus-group-split-fancy GROUPS NO-CROSSPOST CATCH-ALL\)
+\(: gnus-group-split-fancy GROUPS NO-CROSSPOST CATCH-ALL)
GROUPS may be a regular expression or a list of group names, that will
be used to select candidate groups. If it is omitted or nil, all
somewhat less than the maximum size. This option controls
exactly how much less. For example, given a maximum size of
50000 and a prune factor of 0.1, the pruning process will try to
-cut the registry back to \(- 50000 \(* 50000 0.1\)\) -> 45000
+cut the registry back to \(- 50000 \(* 50000 0.1)) -> 45000
entries. The pruning process is constrained by the presence of
\"precious\" entries."
:version "25.1"
:group 'gnus-summary-pick)
(defcustom gnus-summary-pick-line-format
- "%-5P %U\%R\%z\%I\%(%[%4L: %-23,23n%]%) %s\n"
+ "%-5P %U\ %R\ %z\ %I\ %(%[%4L: %-23,23n%]%) %s\n"
"*The format specification of the lines in pick buffers.
It accepts the same format specs that `gnus-summary-line-format' does."
:type 'string
(defun gnus-sieve-update ()
"Update the Sieve script in gnus-sieve-file, by replacing the region
between gnus-sieve-region-start and gnus-sieve-region-end with
-\(gnus-sieve-script gnus-sieve-select-method gnus-sieve-crosspost\), then
+\(gnus-sieve-script gnus-sieve-select-method gnus-sieve-crosspost), then
execute gnus-sieve-update-shell-command.
See the documentation for these variables and functions for details."
(interactive)
(defun gnus-sieve-generate ()
"Generate the Sieve script in gnus-sieve-file, by replacing the region
between gnus-sieve-region-start and gnus-sieve-region-end with
-\(gnus-sieve-script gnus-sieve-select-method gnus-sieve-crosspost\).
+\(gnus-sieve-script gnus-sieve-select-method gnus-sieve-crosspost).
See the documentation for these variables and functions for details."
(interactive)
(require 'sieve)
(defun gnus-sieve-script (&optional method crosspost)
"Generate a Sieve script based on groups with select method METHOD
-\(or all groups if nil\). Only groups having a `sieve' parameter are
+\(or all groups if nil). Only groups having a `sieve' parameter are
considered. This parameter should contain an elisp test
-\(see the documentation of gnus-sieve-test for details\). For each
+\(see the documentation of gnus-sieve-test for details). For each
such group, a Sieve IF control structure is generated, having the
test as the condition and { fileinto \"group.name\"; } as the body.
(defvar gnus-directory-sep-char-regexp "/"
"The regexp of directory separator character.
If you find some problem with the directory separator character, try
-\"[/\\\\\]\" for some systems.")
+\"[/\\\\]\" for some systems.")
(defun gnus-url-unhex (x)
(if (> x ?9)
If you want to save your mail in one group and the news articles you
write in another group, you could say something like:
- \(setq gnus-message-archive-group
+ (setq gnus-message-archive-group
\\='((if (message-news-p)
\"misc-news\"
\"misc-mail\")))
"Which information should be exposed in the User-Agent header.
Can be a list of symbols or a string. Valid symbols are `gnus'
-\(show Gnus version\) and `emacs' \(show Emacs version\). In
+\(show Gnus version) and `emacs' \(show Emacs version). In
addition to the Emacs version, you can add `codename' \(show
-\(S\)XEmacs codename\) or either `config' \(show system
-configuration\) or `type' \(show system type\). If you set it to
+\(S)XEmacs codename) or either `config' \(show system
+configuration) or `type' \(show system type). If you set it to
a string, be sure to use a valid format, see RFC 2616."
:version "22.1"
(defcustom message-archive-header "X-No-Archive: Yes\n"
"Header to insert when you don't want your article to be archived.
-Archives \(such as groups.google.com\) respect this header."
+Archives \(such as groups.google.com) respect this header."
:version "22.1"
:type 'string
:link '(custom-manual "(message)Header Commands")
(defvar message-reply-headers nil
"The headers of the current replied article.
It is a vector of the following headers:
-\[number subject from date id references chars lines xref extra].")
+[number subject from date id references chars lines xref extra].")
(defvar message-newsreader nil)
(defvar message-mailer nil)
(defvar message-sent-message-via nil)
"Alist of ways to send outgoing messages.
Each element has the form
- \(TYPE PREDICATE FUNCTION)
+ (TYPE PREDICATE FUNCTION)
where TYPE is a symbol that names the method; PREDICATE is a function
called without any parameters to determine whether the message is
(goto-char (point-min))
(if (re-search-forward "\
<meta\\s-+http-equiv=[\"']?content-type[\"']?\\s-+content=[\"']\
-text/\\(\\sw+\\)\\(?:\;\\s-*charset=\\([^\"'>]+\\)\\)?[^>]*>" nil t)
+text/\\(\\sw+\\)\\(?:;\\s-*charset=\\([^\"'>]+\\)\\)?[^>]*>" nil t)
(if (and (not force-charset)
(match-beginning 2)
(string-match "\\`html\\'" (match-string 1)))
nil t)
(setq subject (concat (match-string 1) subject))
(setq from (concat (match-string 2) " " from))))))
- (while (and from (string-match "(\[^)\]*)" from))
+ (while (and from (string-match "([^)]*)" from))
(setq from (replace-match "" t t from)))
(insert "From: " (or from "unknown")
"\nSubject: " (or subject "(no subject)") "\n")
"*Max length of the head of articles.
Value is an integer, nil, or t. nil means read in chunks of a file
-indefinitely until a complete head is found\; t means always read the
+indefinitely until a complete head is found; t means always read the
entire file immediately, disregarding `nnheader-head-chop-length'.
Integer values will in effect be rounded up to the nearest multiple of
:initform 0.1
:type float
:custom float
- :documentation "Prune to \(:max-size * :prune-factor\) less
+ :documentation "Prune to (:max-size * :prune-factor) less
than the :max-size limit. Should be a float between 0 and 1.")
(tracked :initarg :tracked
:initform nil
"Prunes the registry-db object DB.
Attempts to prune the number of entries down to \(*
-:max-size :prune-factor\) less than the max-size limit, so
+:max-size :prune-factor) less than the max-size limit, so
pruning doesn't need to happen on every save. Removes only
entries without the :precious keys, so it may not be possible to
reach the target limit.
(defvar rfc1843-hzp-word-regexp
"~\\({\\([\041-\167][\041-\176]\\| \\)+\\|\
-\[<>]\\([\041-\175][\041-\176]\\| \\)+\\)\\(~}\\|$\\)")
+[<>]\\([\041-\175][\041-\176]\\| \\)+\\)\\(~}\\|$\\)")
(defvar rfc1843-hzp-word-regexp-strictly
"~\\({\\([\041-\167][\041-\176]\\)+\\|\
-\[<>]\\([\041-\175][\041-\176]\\)+\\)\\(~}\\|$\\)")
+[<>]\\([\041-\175][\041-\176]\\)+\\)\\(~}\\|$\\)")
(defcustom rfc1843-decode-loosely nil
"Loosely check HZ encoding if non-nil.
(eval-and-compile ;; Necessary to hard code them in `rfc2047-decode-region'.
(defconst rfc2047-encoded-word-regexp
- "=\\?\\([^][\000-\040()<>@,\;:*\\\"/?.=]+\\)\\(?:\\*[^?]+\\)?\\?\
+ "=\\?\\([^][\000-\040()<>@,;:*\\\"/?.=]+\\)\\(?:\\*[^?]+\\)?\\?\
\\(B\\?[+/0-9A-Za-z]*=*\
\\|Q\\?[ ->@-~]*\
\\)\\?="
;; the characters that those encodings may generally use.
)
(defconst rfc2047-encoded-word-regexp-loose
- "=\\?\\([^][\000-\040()<>@,\;:*\\\"/?.=]+\\)\\(?:\\*[^?]+\\)?\\?\
+ "=\\?\\([^][\000-\040()<>@,;:*\\\"/?.=]+\\)\\(?:\\*[^?]+\\)?\\?\
\\(B\\?[+/0-9A-Za-z]*=*\
\\|Q\\?\\(?:\\?+[ -<>@-~]\\)?\\(?:[ ->@-~]+\\?+[ -<>@-~]\\)*[ ->@-~]*\\?*\
\\)\\?="