summaryrefslogtreecommitdiff
path: root/lisp/textmodes
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2015-09-17 16:08:20 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2015-09-17 16:09:39 -0700
commit284c470ef752967fcd8bae6a450dc138462b1e49 (patch)
tree83e8bcfe4c756e741ee9d4ecdf80f6b8d0e73c91 /lisp/textmodes
parentd149ff5233805c0a09b6067e0cf27549291cc83a (diff)
downloademacs-284c470ef752967fcd8bae6a450dc138462b1e49.tar.gz
emacs-284c470ef752967fcd8bae6a450dc138462b1e49.tar.bz2
emacs-284c470ef752967fcd8bae6a450dc138462b1e49.zip
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.
Diffstat (limited to 'lisp/textmodes')
-rw-r--r--lisp/textmodes/bibtex.el8
-rw-r--r--lisp/textmodes/conf-mode.el6
-rw-r--r--lisp/textmodes/css-mode.el2
-rw-r--r--lisp/textmodes/ispell.el12
-rw-r--r--lisp/textmodes/makeinfo.el2
-rw-r--r--lisp/textmodes/page-ext.el4
-rw-r--r--lisp/textmodes/refer.el10
-rw-r--r--lisp/textmodes/reftex-cite.el6
-rw-r--r--lisp/textmodes/reftex.el6
-rw-r--r--lisp/textmodes/rst.el4
-rw-r--r--lisp/textmodes/sgml-mode.el2
-rw-r--r--lisp/textmodes/tex-mode.el10
-rw-r--r--lisp/textmodes/texinfmt.el8
-rw-r--r--lisp/textmodes/texinfo.el2
-rw-r--r--lisp/textmodes/texnfo-upd.el18
15 files changed, 50 insertions, 50 deletions
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el
index 279f657c0ec..df8066ee2fc 100644
--- a/lisp/textmodes/bibtex.el
+++ b/lisp/textmodes/bibtex.el
@@ -433,7 +433,7 @@ is present; but these fields are required otherwise.
OPTIONAL is a list of optional fields.
Each element of these lists is a list of the form
- \(FIELD COMMENT INIT ALTERNATIVE).
+ (FIELD COMMENT INIT ALTERNATIVE).
COMMENT, INIT, and ALTERNATIVE are optional.
FIELD is the name of the field.
@@ -2620,7 +2620,7 @@ is returned unchanged."
"Get content of BibTeX field FIELD. Return empty string if not found.
Optional arg CHANGE-LIST is a list of substitution patterns that is
applied to the content of FIELD. It is an alist with pairs
-\(OLD-REGEXP . NEW-STRING\)."
+\(OLD-REGEXP . NEW-STRING)."
(let* ((bibtex-expand-strings bibtex-autokey-expand-strings)
(content (bibtex-text-in-field field bibtex-autokey-use-crossref))
case-fold-search)
@@ -3647,7 +3647,7 @@ If optional arg CONTENT is non-nil extract content of text fields."
(defun bibtex-autofill-entry ()
"Try to fill fields of current BibTeX entry based on neighboring entries.
The current entry must have a key. Determine the neighboring entry
-\(previous or next\) whose key is more similar to the key of the current
+\(previous or next) whose key is more similar to the key of the current
entry. For all empty fields of the current entry insert the corresponding
field contents of the neighboring entry. Finally try to update the text
based on the difference between the keys of the neighboring and the current
@@ -5111,7 +5111,7 @@ entries from minibuffer."
"Browse a URL for the BibTeX entry at point.
Optional POS is the location of the BibTeX entry.
The URL is generated using the schemes defined in `bibtex-generate-url-list'
-\(see there\). If multiple schemes match for this entry, or the same scheme
+\(see there). If multiple schemes match for this entry, or the same scheme
matches more than once, use the one for which the first step's match is the
closest to POS. The URL is passed to `browse-url' unless NO-BROWSE is t.
Return the URL or nil if none can be generated."
diff --git a/lisp/textmodes/conf-mode.el b/lisp/textmodes/conf-mode.el
index 267d23f38de..770571a264e 100644
--- a/lisp/textmodes/conf-mode.el
+++ b/lisp/textmodes/conf-mode.el
@@ -434,7 +434,7 @@ For details see `conf-mode'. Example:
# Conf mode font-locks this right on Unix and with \\[conf-unix-mode]
-\[Desktop Entry]
+[Desktop Entry]
Encoding=UTF-8
Name=The GIMP
Name[ca]=El GIMP
@@ -449,11 +449,11 @@ For details see `conf-mode'. Example:
; Conf mode font-locks this right on Windows and with \\[conf-windows-mode]
-\[ExtShellFolderViews]
+[ExtShellFolderViews]
Default={5984FFE0-28D4-11CF-AE66-08002B2E1262}
{5984FFE0-28D4-11CF-AE66-08002B2E1262}={5984FFE0-28D4-11CF-AE66-08002B2E1262}
-\[{5984FFE0-28D4-11CF-AE66-08002B2E1262}]
+[{5984FFE0-28D4-11CF-AE66-08002B2E1262}]
PersistMoniker=file://Folder.htt"
(conf-mode-initialize ";"))
diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el
index 639456dc77e..aa5469e3465 100644
--- a/lisp/textmodes/css-mode.el
+++ b/lisp/textmodes/css-mode.el
@@ -265,7 +265,7 @@
"\\(?:\\(:" (regexp-opt (append css-pseudo-class-ids
css-pseudo-element-ids) t)
"\\|\\::" (regexp-opt css-pseudo-element-ids t) "\\)"
- "\\(?:([^\)]+)\\)?"
+ "\\(?:([^)]+)\\)?"
(if (not sassy)
"[^:{}\n]*"
(concat "[^:{}\n#]*\\(?:" scss--hash-re "[^:{}\n#]*\\)*"))
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 87c2a95da49..fe27f0f158c 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -699,8 +699,8 @@ re-start Emacs."
Each element of this list is also a list:
-\(DICTIONARY-NAME CASECHARS NOT-CASECHARS OTHERCHARS MANY-OTHERCHARS-P
- ISPELL-ARGS EXTENDED-CHARACTER-MODE CHARACTER-SET\)
+ (DICTIONARY-NAME CASECHARS NOT-CASECHARS OTHERCHARS MANY-OTHERCHARS-P
+ ISPELL-ARGS EXTENDED-CHARACTER-MODE CHARACTER-SET)
DICTIONARY-NAME is a possible string value of variable `ispell-dictionary',
nil means the default dictionary.
@@ -747,7 +747,7 @@ when the language uses non-ASCII characters.
Note that with \"ispell\" as the speller, the CASECHARS and
OTHERCHARS slots of the alist should contain the same character
set as casechars and otherchars in the LANGUAGE.aff file \(e.g.,
-english.aff\). Aspell and Hunspell don't have this limitation.")
+english.aff). Aspell and Hunspell don't have this limitation.")
(defvar ispell-really-aspell nil
"Non-nil if we can use Aspell extensions.")
@@ -2024,7 +2024,7 @@ in a window allowing you to choose one.
If optional argument FOLLOWING is non-nil or if `ispell-following-word'
is non-nil when called interactively, then the following word
-\(rather than preceding\) is checked when the cursor is not over a word.
+\(rather than preceding) is checked when the cursor is not over a word.
When the optional argument QUIETLY is non-nil or `ispell-quietly' is non-nil
when called interactively, non-corrective messages are suppressed.
@@ -2044,7 +2044,7 @@ Return values:
nil word is correct or spelling is accepted.
0 word is inserted into buffer-local definitions.
\"word\" word corrected from word list.
-\(\"word\" arg\) word is hand entered.
+\(\"word\" arg) word is hand entered.
quit spell session exited."
(interactive (list ispell-following-word ispell-quietly current-prefix-arg t))
(cond
@@ -2162,7 +2162,7 @@ quit spell session exited."
"Return the word for spell-checking according to ispell syntax.
If optional argument FOLLOWING is non-nil or if `ispell-following-word'
is non-nil when called interactively, then the following word
-\(rather than preceding\) is checked when the cursor is not over a word.
+\(rather than preceding) is checked when the cursor is not over a word.
Optional second argument contains otherchars that can be included in word
many times (see the doc string of `ispell-dictionary-alist' for details
about otherchars).
diff --git a/lisp/textmodes/makeinfo.el b/lisp/textmodes/makeinfo.el
index b9b72ea644f..0ca4cbefe93 100644
--- a/lisp/textmodes/makeinfo.el
+++ b/lisp/textmodes/makeinfo.el
@@ -228,7 +228,7 @@ nonsensical results."
"Make Info file from current buffer.
Use the \\[next-error] command to move to the next error
-\(if there are errors\)."
+\(if there are errors)."
(interactive)
(cond ((null buffer-file-name)
diff --git a/lisp/textmodes/page-ext.el b/lisp/textmodes/page-ext.el
index 57134e06c19..99962c75897 100644
--- a/lisp/textmodes/page-ext.el
+++ b/lisp/textmodes/page-ext.el
@@ -446,7 +446,7 @@ REVERSE (non-nil means reverse order), BEG and END (region to sort)."
(defun sort-pages-buffer (&optional reverse)
"Sort pages alphabetically in buffer. Prefix arg means reverse order.
-\(Non-nil arg if not interactive.\)"
+\(Non-nil arg if not interactive.)"
(interactive "P")
(or reverse (setq reverse nil))
@@ -461,7 +461,7 @@ REVERSE (non-nil means reverse order), BEG and END (region to sort)."
(defvar pages-directory-previous-regexp nil
"Value of previous regexp used by `pages-directory'.
\(This regular expression may be used to select only those pages that
-contain matches to the regexp.\)")
+contain matches to the regexp.)")
(defvar pages-buffer nil
"The buffer for which the pages-directory function creates the directory.")
diff --git a/lisp/textmodes/refer.el b/lisp/textmodes/refer.el
index 8d824ebad35..22dc7dc9165 100644
--- a/lisp/textmodes/refer.el
+++ b/lisp/textmodes/refer.el
@@ -229,7 +229,7 @@ found on the last `refer-find-entry' or `refer-find-next-entry'."
(sit-for 1)
(setq files (cdr files))))))
(ding)
- (message "Keywords \"%s\" not found in any \.bib file" keywords))
+ (message "Keywords \"%s\" not found in any .bib file" keywords))
(select-window old-window)))
(defun refer-find-entry-in-file (keywords-list file &optional old-pos)
@@ -351,21 +351,21 @@ found on the last `refer-find-entry' or `refer-find-next-entry'."
(if (progn
(goto-char (point-min))
(re-search-forward (concat refer-bib-files-regexp
- "\\s-*\{") nil t))
+ "\\s-*{") nil t))
(let ((files (list (buffer-substring
(point)
(progn
- (re-search-forward "[,\}]"
+ (re-search-forward "[,}]"
nil t)
(backward-char 1)
(point))))))
- (while (not (looking-at "\}"))
+ (while (not (looking-at "}"))
(setq files (append files
(list (buffer-substring
(progn (forward-char 1)
(point))
(progn (re-search-forward
- "[,\}]" nil t)
+ "[,}]" nil t)
(backward-char 1)
(point)))))))
files)
diff --git a/lisp/textmodes/reftex-cite.el b/lisp/textmodes/reftex-cite.el
index 17e8cfdc83c..173c8a8d11d 100644
--- a/lisp/textmodes/reftex-cite.el
+++ b/lisp/textmodes/reftex-cite.el
@@ -385,7 +385,7 @@ The environment should be located in FILES."
(buffer-substring-no-properties
start end)
"[ \t\n\r]*\\\\bibitem[ \t]*\
-\\(\\[[^]]*]\\)*\[ \t]*"))))))
+\\(\\[[^]]*]\\)*[ \t]*"))))))
(goto-char end))))))
(unless entries
(error "No bibitems found"))
@@ -477,7 +477,7 @@ If RAW is non-nil, keep double quotes/curly braces delimiting fields."
(goto-char (point-min))
(if (re-search-forward "@\\(\\(?:\\w\\|\\s_\\)+\\)[ \t\n\r]*\
-\[{(][ \t\n\r]*\\([^ \t\n\r,]+\\)" nil t)
+[{(][ \t\n\r]*\\([^ \t\n\r,]+\\)" nil t)
(setq alist
(list
(cons "&type" (downcase (reftex-match-string 1)))
@@ -1195,7 +1195,7 @@ created files in the variables `reftex-create-bibtex-header' or
(widen)
(goto-char (point-min))
(while (re-search-forward "^[ \t]*@\\(?:\\w\\|\\s_\\)+[ \t\n\r]*\
-\[{(][ \t\n\r]*\\([^ \t\n\r,]+\\)" nil t)
+[{(][ \t\n\r]*\\([^ \t\n\r,]+\\)" nil t)
(setq key (match-string 1)
beg (match-beginning 0)
end (progn
diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el
index 7dc91844583..0ff1d72451e 100644
--- a/lisp/textmodes/reftex.el
+++ b/lisp/textmodes/reftex.el
@@ -2354,7 +2354,7 @@ what in fact did happen.
Check if the bug is reproducible with an up-to-date version of
RefTeX available from http://www.gnu.org/software/auctex/.
-If the bug is triggered by a specific \(La\)TeX file, you should try
+If the bug is triggered by a specific \(La)TeX file, you should try
to produce a minimal sample file showing the problem and include it
in your report.
@@ -2446,7 +2446,7 @@ of ENTRY-LIST is a list of cons cells (\"MACRONAME\" . LEVEL). See
;;;***
-;;;### (autoloads nil "reftex-cite" "reftex-cite.el" "83811ccf3471820f0ad0dc005ffc88d5")
+;;;### (autoloads nil "reftex-cite" "reftex-cite.el" "43a3f05c024aee5b7708420f74266933")
;;; Generated autoloads from reftex-cite.el
(autoload 'reftex-default-bibliography "reftex-cite" "\
@@ -2774,7 +2774,7 @@ Here are all local bindings.
;;;***
-;;;### (autoloads nil "reftex-parse" "reftex-parse.el" "c327a848a6d168412b1a9be9f2e3dce8")
+;;;### (autoloads nil "reftex-parse" "reftex-parse.el" "7bfdcb2f040dbe9a08d2c38c005c8f21")
;;; Generated autoloads from reftex-parse.el
(autoload 'reftex-parse-one "reftex-parse" "\
diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el
index 9625ec2c7cc..e6bfe5f1662 100644
--- a/lisp/textmodes/rst.el
+++ b/lisp/textmodes/rst.el
@@ -442,7 +442,7 @@ in parentheses follows the development revision and the time stamp.")
(opt-tag (:shy optsta-tag optnam-tag optarg-tag "?")) ; A complete option.
;; Footnotes and citations (`fnc')
- (fncnam-prt "[^\]\n]") ; Part of a footnote or citation name.
+ (fncnam-prt "[^]\n]") ; Part of a footnote or citation name.
(fncnam-tag fncnam-prt "+") ; A footnote or citation name.
(fnc-tag "\\[" fncnam-tag "]") ; A complete footnote or citation tag.
(fncdef-tag-2 (:grp exm-sta)
@@ -512,7 +512,7 @@ in parentheses follows the development revision and the time stamp.")
; colon tag.
;; Comments (`cmt')
- (cmt-sta-1 (:grp exm-sta) "[^\[|_\n]"
+ (cmt-sta-1 (:grp exm-sta) "[^[|_\n]"
(:alt "[^:\n]" (:seq ":" (:alt "[^:\n]" "$")))
"*$") ; Start of a comment block; first group is explicit markup
; start.
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el
index cb65e5f1073..55a1e6d26db 100644
--- a/lisp/textmodes/sgml-mode.el
+++ b/lisp/textmodes/sgml-mode.el
@@ -525,7 +525,7 @@ Do \\[describe-key] on the following bindings to discover what they do.
;; This is desirable because SGML discards a newline that appears
;; immediately after a start tag or immediately before an end tag.
(setq-local paragraph-start (concat "[ \t]*$\\|\
-\[ \t]*</?\\(" sgml-name-re sgml-attrs-re "\\)?>"))
+[ \t]*</?\\(" sgml-name-re sgml-attrs-re "\\)?>"))
(setq-local paragraph-separate (concat paragraph-start "$"))
(setq-local adaptive-fill-regexp "[ \t]*")
(add-hook 'fill-nobreak-predicate 'sgml-fill-nobreak nil t)
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 51cda80c5bd..0a4e070d4b5 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -135,8 +135,8 @@ If nil, TeX runs with no options. See the documentation of `tex-command'."
"TeX commands to use when starting TeX.
They are shell-quoted and precede the input file name, with a separating space.
If nil, no commands are used. See the documentation of `tex-command'."
- :type '(radio (const :tag "Interactive \(nil\)" nil)
- (const :tag "Nonstop \(\"\\nonstopmode\\input\"\)"
+ :type '(radio (const :tag "Interactive (nil)" nil)
+ (const :tag "Nonstop (\"\\nonstopmode\\input\")"
"\\nonstopmode\\input")
(string :tag "String at your choice"))
:group 'tex-run
@@ -266,8 +266,8 @@ tex shell terminates.")
(defvar tex-command "tex"
"Command to run TeX.
-If this string contains an asterisk \(`*'\), that is replaced by the file name;
-otherwise the value of `tex-start-options', the \(shell-quoted\)
+If this string contains an asterisk \(`*'), that is replaced by the file name;
+otherwise the value of `tex-start-options', the \(shell-quoted)
value of `tex-start-commands', and the file name are added at the end
with blanks as separators.
@@ -387,7 +387,7 @@ An alternative value is \" . \", if you use a font with a narrow period."
(goto-char (point-min))
(while (search-forward-regexp
"\\\\\\(include\\|input\\|verbatiminput\\|bibliography\\)\
-\[ \t]*{\\([^}\n]+\\)}"
+[ \t]*{\\([^}\n]+\\)}"
nil t)
(push (cons (concat "<<" (buffer-substring-no-properties
(match-beginning 2)
diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el
index 37f10a8e871..500c1e38394 100644
--- a/lisp/textmodes/texinfmt.el
+++ b/lisp/textmodes/texinfmt.el
@@ -1043,7 +1043,7 @@ Leave point after argument."
(setq texinfo-command-end (point)))
(t
(error
- "Invalid `texinfo-optional-braces-discard' format \(need braces?\)")))
+ "Invalid `texinfo-optional-braces-discard' format (need braces?)")))
(delete-region texinfo-command-start texinfo-command-end)))
(defun texinfo-format-parse-line-args ()
@@ -2336,7 +2336,7 @@ Use only the FILENAME arg; for Info, ignore the other arguments to @image."
;; Write a `@definfoenclose' command on a line and follow it with three
;; arguments separated by commas (commas are used as separators in an
;; `@node' line in the same way). The first argument to
-;; `@definfoenclose' is the @-command name \(without the `@'\); the
+;; `@definfoenclose' is the @-command name (without the `@'); the
;; second argument is the Info start delimiter string; and the third
;; argument is the Info end delimiter string. The latter two arguments
;; enclose the highlighted text in the Info file. A delimiter string
@@ -2491,8 +2491,8 @@ surrounded by in angle brackets."
Enclose the verbatim text, including the delimiters, in braces. Print
text exactly as written (but not the delimiters) in a fixed-width.
-For example, @verb\{|@|\} results in @ and
-@verb\{+@\\='e?\\=`!\\=`+} results in @\\='e?\\=`!\\=`."
+For example, @verb{|@|} results in @ and
+@verb{+@\\='e?\\=`!\\=`+} results in @\\='e?\\=`!\\=`."
(let ((delimiter (buffer-substring-no-properties
(1+ texinfo-command-end) (+ 2 texinfo-command-end))))
diff --git a/lisp/textmodes/texinfo.el b/lisp/textmodes/texinfo.el
index 2c6d5b3827c..57218177d7b 100644
--- a/lisp/textmodes/texinfo.el
+++ b/lisp/textmodes/texinfo.el
@@ -86,7 +86,7 @@ command to gain use of `next-error'."
"Make Info file from current buffer.
Use the \\[next-error] command to move to the next error
-\(if there are errors\)."
+\(if there are errors)."
t nil)
(autoload 'kill-compilation
diff --git a/lisp/textmodes/texnfo-upd.el b/lisp/textmodes/texnfo-upd.el
index 0508426619f..321967a3721 100644
--- a/lisp/textmodes/texnfo-upd.el
+++ b/lisp/textmodes/texnfo-upd.el
@@ -694,8 +694,8 @@ section titles are often too short to explain a node well.
MENU-LIST has form:
- \(\(\"node-name1\" . \"description\"\)
- \(\"node-name2\" . \"description\"\) ... \)
+ ((\"node-name1\" . \"description\")
+ (\"node-name2\" . \"description\") ... )
However, the description field might be nil.
@@ -1002,9 +1002,9 @@ following menu and the title of the node preceding that menu.
The master menu list has this form:
- \(\(\(... \"entry-1-2\" \"entry-1\"\) \"title-1\"\)
- \(\(... \"entry-2-2\" \"entry-2-1\"\) \"title-2\"\)
- ...\)
+ (((... \"entry-1-2\" \"entry-1\") \"title-1\")
+ ((... \"entry-2-2\" \"entry-2-1\") \"title-2\")
+ ...)
However, there does not need to be a title field."
@@ -1018,7 +1018,7 @@ However, there does not need to be a title field."
"Format and insert the master menu in the current buffer."
(goto-char (point-min))
;; Insert a master menu only after `Top' node and before next node
- ;; \(or include file if there is no next node\).
+ ;; (or include file if there is no next node).
(unless (re-search-forward "^@node [ \t]*top[ \t]*\\(,\\|$\\)" nil t)
(error "This buffer needs a Top node"))
(let ((first-chapter
@@ -1407,7 +1407,7 @@ level in the Texinfo file; when looking for the `Previous' pointer,
the section found will be at the same or higher hierarchical level in
the Texinfo file; when looking for the `Up' pointer, the section found
will be at some level higher in the Texinfo file. The fourth argument
-\(one of `next', `previous', or `up'\) specifies whether to find the
+\(one of `next', `previous', or `up') specifies whether to find the
`Next', `Previous', or `Up' pointer."
(let ((case-fold-search t))
(cond ((eq direction 'next)
@@ -1850,8 +1850,8 @@ chapters."
;; The menu-list has the form:
;;
-;; \(\(\"node-name1\" . \"title1\"\)
-;; \(\"node-name2\" . \"title2\"\) ... \)
+;; ((\"node-name1\" . \"title1\")
+;; (\"node-name2\" . \"title2\") ... )
;;
;; However, there does not need to be a title field and this function
;; does not fill it; however a comment tells you how to do so.