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.
This commit is contained in:
parent
d149ff5233
commit
284c470ef7
237 changed files with 916 additions and 914 deletions
|
@ -3107,7 +3107,7 @@ deactivation, which might run hooks and get into other trouble."
|
|||
"Define a piece of advice for FUNCTION (a symbol).
|
||||
The syntax of `defadvice' is as follows:
|
||||
|
||||
\(defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...)
|
||||
(defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...)
|
||||
[DOCSTRING] [INTERACTIVE-FORM]
|
||||
BODY...)
|
||||
|
||||
|
|
|
@ -615,7 +615,7 @@ is more efficient."
|
|||
of all elements of TREE.
|
||||
|
||||
If REVERSE is non-nil, the stack is sorted in reverse order.
|
||||
\(See also `avl-tree-stack-pop'\).
|
||||
\(See also `avl-tree-stack-pop').
|
||||
|
||||
Note that any modification to TREE *immediately* invalidates all
|
||||
avl-tree-stacks created before the modification (in particular,
|
||||
|
|
|
@ -397,7 +397,7 @@ invoked interactively are excluded from this list."
|
|||
"Alist of functions and their call tree.
|
||||
Each element looks like
|
||||
|
||||
\(FUNCTION CALLERS CALLS\)
|
||||
(FUNCTION CALLERS CALLS)
|
||||
|
||||
where CALLERS is a list of functions that call FUNCTION, and CALLS
|
||||
is a list of functions for which calls were generated while compiling
|
||||
|
@ -4529,11 +4529,11 @@ whose definitions have been compiled in this Emacs session, as well as
|
|||
all functions called by those functions.
|
||||
|
||||
The call graph does not include macros, inline functions, or
|
||||
primitives that the byte-code interpreter knows about directly \(eq,
|
||||
cons, etc.\).
|
||||
primitives that the byte-code interpreter knows about directly
|
||||
\(`eq', `cons', etc.).
|
||||
|
||||
The call tree also lists those functions which are not known to be called
|
||||
\(that is, to which no calls have been compiled\), and which cannot be
|
||||
\(that is, to which no calls have been compiled), and which cannot be
|
||||
invoked interactively."
|
||||
(interactive)
|
||||
(message "Generating call tree...")
|
||||
|
|
|
@ -162,7 +162,7 @@ def\\(?:un\\|subst\\|foo\\|method\\|class\\|\
|
|||
ine-\\(?:derived\\|generic\\|\\(?:global\\(?:ized\\)?-\\)?minor\\)-mode\\|\
|
||||
\\(?:ine-obsolete-function-\\)?alias[ \t]+'\\|\
|
||||
ine-overloadable-function\\)\\)\
|
||||
\[ \t]*%s\\([ \t;]+\\|$\\)")
|
||||
[ \t]*%s\\([ \t;]+\\|$\\)")
|
||||
(regexp-opt (mapcar 'cadr fnlist) t)))
|
||||
(while (re-search-forward re nil t)
|
||||
(skip-chars-forward " \t\n")
|
||||
|
|
|
@ -136,7 +136,7 @@ BODY contains code to execute each time the mode is enabled or disabled.
|
|||
:variable PLACE The location to use instead of the variable MODE to store
|
||||
the state of the mode. This can be simply a different
|
||||
named variable, or a generalized variable.
|
||||
PLACE can also be of the form \(GET . SET), where GET is
|
||||
PLACE can also be of the form (GET . SET), where GET is
|
||||
an expression that returns the current state, and SET is
|
||||
a function that takes one argument, the new state, and
|
||||
sets it. If you specify a :variable, this function does
|
||||
|
|
|
@ -3162,12 +3162,12 @@ Do this when stopped before the form or it will be too late.
|
|||
One side effect of using this command is that the next time the
|
||||
function or macro is called, Edebug will be called there as well."
|
||||
(interactive)
|
||||
(if (not (looking-at "\("))
|
||||
(if (not (looking-at "("))
|
||||
(error "You must be before a list form")
|
||||
(let ((func
|
||||
(save-excursion
|
||||
(down-list 1)
|
||||
(if (looking-at "\(")
|
||||
(if (looking-at "(")
|
||||
(edebug--form-data-name
|
||||
(edebug-get-form-data-entry (point)))
|
||||
(read (current-buffer))))))
|
||||
|
@ -3790,10 +3790,10 @@ Otherwise call `debug' normally."
|
|||
(if t (progn
|
||||
|
||||
;; Delete interspersed edebug internals.
|
||||
(while (re-search-forward "^ \(?edebug" nil t)
|
||||
(while (re-search-forward "^ (?edebug" nil t)
|
||||
(beginning-of-line)
|
||||
(cond
|
||||
((looking-at "^ \(edebug-after")
|
||||
((looking-at "^ (edebug-after")
|
||||
;; Previous lines may contain code, so just delete this line.
|
||||
(setq last-ok-point (point))
|
||||
(forward-line 1)
|
||||
|
|
|
@ -137,7 +137,7 @@ the name of the test and the result of NAME-FORM."
|
|||
|
||||
This effectively executes
|
||||
|
||||
\(apply (car COMMAND) (cdr COMMAND)\)
|
||||
(apply (car COMMAND) (cdr COMMAND))
|
||||
|
||||
and returns the same value, but additionally runs hooks like
|
||||
`pre-command-hook' and `post-command-hook', and sets variables
|
||||
|
@ -189,7 +189,7 @@ test for `called-interactively' in the command will fail."
|
|||
"Return a copy of S with all matches of REGEXPS removed.
|
||||
|
||||
Elements of REGEXPS may also be two-element lists \(REGEXP
|
||||
SUBEXP\), where SUBEXP is the number of a subexpression in
|
||||
SUBEXP), where SUBEXP is the number of a subexpression in
|
||||
REGEXP. In that case, only that subexpression will be removed
|
||||
rather than the entire match."
|
||||
;; Use a temporary buffer since replace-match copies strings, which
|
||||
|
@ -215,7 +215,7 @@ property list, or no properties if there is no plist before it.
|
|||
As a simple example,
|
||||
|
||||
\(ert-propertized-string \"foo \" \\='(face italic) \"bar\" \" baz\" nil \
|
||||
\" quux\"\)
|
||||
\" quux\")
|
||||
|
||||
would return the string \"foo bar baz quux\" where the substring
|
||||
\"bar baz\" has a `face' property with the value `italic'.
|
||||
|
|
|
@ -187,7 +187,7 @@ using :expected-result. See `ert-test-result-type-p' for a
|
|||
description of valid values for RESULT-TYPE.
|
||||
|
||||
\(fn NAME () [DOCSTRING] [:expected-result RESULT-TYPE] \
|
||||
\[:tags '(TAG...)] BODY...)"
|
||||
[:tags '(TAG...)] BODY...)"
|
||||
(declare (debug (&define :name test
|
||||
name sexp [&optional stringp]
|
||||
[&rest keywordp sexp] def-body))
|
||||
|
@ -887,10 +887,10 @@ Valid result types:
|
|||
nil -- Never matches.
|
||||
t -- Always matches.
|
||||
:failed, :passed, :skipped -- Matches corresponding results.
|
||||
\(and TYPES...\) -- Matches if all TYPES match.
|
||||
\(or TYPES...\) -- Matches if some TYPES match.
|
||||
\(not TYPE\) -- Matches if TYPE does not match.
|
||||
\(satisfies PREDICATE\) -- Matches if PREDICATE returns true when called with
|
||||
\(and TYPES...) -- Matches if all TYPES match.
|
||||
\(or TYPES...) -- Matches if some TYPES match.
|
||||
\(not TYPE) -- Matches if TYPE does not match.
|
||||
\(satisfies PREDICATE) -- Matches if PREDICATE returns true when called with
|
||||
RESULT."
|
||||
;; It would be easy to add `member' and `eql' types etc., but I
|
||||
;; haven't bothered yet.
|
||||
|
@ -946,7 +946,7 @@ a test -- (i.e., an object of the ert-test data-type) Selects that test.
|
|||
a symbol -- Selects the test that the symbol names, errors if none.
|
||||
\(member TESTS...) -- Selects the elements of TESTS, a list of tests
|
||||
or symbols naming tests.
|
||||
\(eql TEST\) -- Selects TEST, a test or a symbol naming a test.
|
||||
\(eql TEST) -- Selects TEST, a test or a symbol naming a test.
|
||||
\(and SELECTORS...) -- Selects the tests that match all SELECTORS.
|
||||
\(or SELECTORS...) -- Selects the tests that match any of the SELECTORS.
|
||||
\(not SELECTOR) -- Selects all tests that do not match SELECTOR.
|
||||
|
|
|
@ -62,7 +62,7 @@ ine\\(?:-global\\)?-minor-mode\\|ine-compilation-mode\\|un-cvs-mode\\|\
|
|||
foo\\|\\(?:[^icfgv]\\|g[^r]\\)\\(\\w\\|\\s_\\)+\\*?\\)\\|easy-mmode-define-[a-z-]+\\|easy-menu-define\\|\
|
||||
menu-bar-make-toggle\\)"
|
||||
find-function-space-re
|
||||
"\\('\\|\(quote \\)?%s\\(\\s-\\|$\\|\(\\|\)\\)")
|
||||
"\\('\\|(quote \\)?%s\\(\\s-\\|$\\|[()]\\)")
|
||||
"The regexp used by `find-function' to search for a function definition.
|
||||
Note it must contain a `%s' at the place where `format'
|
||||
should insert the function name. The default value avoids `defconst',
|
||||
|
|
|
@ -233,7 +233,7 @@ turned into calls of the form (SETTER ARGS... VAL).
|
|||
|
||||
If FIX-RETURN is non-nil, then SETTER is not assumed to return VAL and
|
||||
instead the assignment is turned into something equivalent to
|
||||
\(let ((temp VAL))
|
||||
(let ((temp VAL))
|
||||
(SETTER ARGS... temp)
|
||||
temp)
|
||||
so as to preserve the semantics of `setf'."
|
||||
|
|
|
@ -889,7 +889,7 @@ property `lisp-indent-function' (or the deprecated `lisp-indent-hook'),
|
|||
it specifies how to indent. The property value can be:
|
||||
|
||||
* `defun', meaning indent `defun'-style
|
||||
\(this is also the case if there is no property and the function
|
||||
(this is also the case if there is no property and the function
|
||||
has a name that begins with \"def\", and three or more arguments);
|
||||
|
||||
* an integer N, meaning indent the first N arguments specially
|
||||
|
|
|
@ -44,7 +44,7 @@ Takes args PROMPTER ACTOR LIST, and optional args HELP and ACTION-ALIST.
|
|||
LIST is a list of objects, or a function of no arguments to return the next
|
||||
object or nil.
|
||||
|
||||
If PROMPTER is a string, the prompt is \(format PROMPTER OBJECT\). If not
|
||||
If PROMPTER is a string, the prompt is \(format PROMPTER OBJECT). If not
|
||||
a string, PROMPTER is a function of one arg (an object from LIST), which
|
||||
returns a string to be used as the prompt for that object. If the return
|
||||
value is not a string, it may be nil to ignore the object or non-nil to act
|
||||
|
@ -56,7 +56,7 @@ which gets called with each object that the user answers `yes' for.
|
|||
If HELP is given, it is a list (OBJECT OBJECTS ACTION),
|
||||
where OBJECT is a string giving the singular noun for an elt of LIST;
|
||||
OBJECTS is the plural noun for elts of LIST, and ACTION is a transitive
|
||||
verb describing ACTOR. The default is \(\"object\" \"objects\" \"act on\"\).
|
||||
verb describing ACTOR. The default is \(\"object\" \"objects\" \"act on\").
|
||||
|
||||
At the prompts, the user may enter y, Y, or SPC to act on that object;
|
||||
n, N, or DEL to skip that object; ! to act on all following objects;
|
||||
|
|
|
@ -143,7 +143,7 @@ If LAX non-nil, don't output parentheses if it doesn't require them.
|
|||
Merges keywords to avoid backtracking in Emacs's regexp matcher."
|
||||
;; The basic idea is to find the shortest common prefix or suffix, remove it
|
||||
;; and recurse. If there is no prefix, we divide the list into two so that
|
||||
;; \(at least) one half will have at least a one-character common prefix.
|
||||
;; (at least) one half will have at least a one-character common prefix.
|
||||
|
||||
;; Also we delay the addition of grouping parenthesis as long as possible
|
||||
;; until we're sure we need them, and try to remove one-character sequences
|
||||
|
|
|
@ -768,8 +768,8 @@ of all atomic regexps."
|
|||
((= l 3) (string-match "\\`\\(?:\\\\[cCsS_]\\|\\[[^^]\\]\\)" r))
|
||||
((null lax)
|
||||
(cond
|
||||
((string-match "\\`\\[^?\]?\\(?:\\[:[a-z]+:]\\|[^\]]\\)*\\]\\'" r))
|
||||
((string-match "\\`\\\\(\\(?:[^\\]\\|\\\\[^\)]\\)*\\\\)\\'" r)))))))
|
||||
((string-match "\\`\\[^?\]?\\(?:\\[:[a-z]+:]\\|[^]]\\)*\\]\\'" r))
|
||||
((string-match "\\`\\\\(\\(?:[^\\]\\|\\\\[^)]\\)*\\\\)\\'" r)))))))
|
||||
|
||||
|
||||
(defun rx-syntax (form)
|
||||
|
|
|
@ -68,9 +68,9 @@ This is slower, but filters out some innocuous shadowing."
|
|||
"Return a list of Emacs Lisp files that create shadows.
|
||||
This function does the work for `list-load-path-shadows'.
|
||||
|
||||
We traverse PATH looking for shadows, and return a \(possibly empty\)
|
||||
We traverse PATH looking for shadows, and return a \(possibly empty)
|
||||
even-length list of files. A file in this list at position 2i shadows
|
||||
the file in position 2i+1. Emacs Lisp file suffixes \(.el and .elc\)
|
||||
the file in position 2i+1. Emacs Lisp file suffixes \(.el and .elc)
|
||||
are stripped from the file names in the list.
|
||||
|
||||
See the documentation for `list-load-path-shadows' for further information."
|
||||
|
|
|
@ -213,7 +213,7 @@ one of those elements share the same precedence level and associativity."
|
|||
(defun smie-bnf->prec2 (bnf &rest resolvers)
|
||||
"Convert the BNF grammar into a prec2 table.
|
||||
BNF is a list of nonterminal definitions of the form:
|
||||
\(NONTERM RHS1 RHS2 ...)
|
||||
(NONTERM RHS1 RHS2 ...)
|
||||
where each RHS is a (non-empty) list of terminals (aka tokens) or non-terminals.
|
||||
Not all grammars are accepted:
|
||||
- an RHS cannot be an empty list (this is not needed, since SMIE allows all
|
||||
|
|
|
@ -205,7 +205,7 @@ timers). If nil, allocate a new cell."
|
|||
"Insert TIMER into `timer-idle-list'.
|
||||
This arranges to activate TIMER whenever Emacs is next idle.
|
||||
If optional argument DONT-WAIT is non-nil, set TIMER to activate
|
||||
immediately \(see below\), or at the right time, if Emacs is
|
||||
immediately \(see below), or at the right time, if Emacs is
|
||||
already idle.
|
||||
|
||||
REUSE-CELL, if non-nil, is a cons cell to reuse when inserting
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue