diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2019-03-16 11:36:38 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2019-03-16 11:38:58 -0700 |
commit | 8832cc5f91a420db6bea65f381a3fb3597eb7523 (patch) | |
tree | 48a0189439e5da055b0431428d583694f1dd75c8 /lisp/progmodes | |
parent | 34dd4e0a83e19882f61c9a2ac99ecc12632d13d4 (diff) | |
download | emacs-8832cc5f91a420db6bea65f381a3fb3597eb7523.tar.gz |
Fix some ineffective backslashes in string literals
Deal with lone backslashes that have no effect in string literals,
but indicate that something is amiss.
* lisp/auth-source-pass.el (auth-source-pass-entries):
* lisp/textmodes/artist.el (artist-figlet-get-font-list-windows):
* lisp/org/ob-abc.el (org-babel-expand-body:abc, org-babel-execute:abc):
* lisp/org/ob-forth.el (org-babel-forth-session-execute):
* lisp/vc/vc-git.el (vc-git--program-version):
Add backslash in regexp for correctness.
* lisp/gnus/nnmail.el (nnmail-split-abbrev-alist):
Replace `\||' with `\\|' to follow the obvious regexp intent.
* lisp/org/org-list.el (org-plain-list-ordered-item-terminator):
Add backslash in doc comment so that it appears as intended.
* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1, c-end-of-decl-1):
* lisp/progmodes/f90.el (f90-font-lock-keywords-2):
* lisp/progmodes/etags.el (etags-tags-completion-table):
* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize):
* test/lisp/emacs-lisp/cl-print-tests.el (cl-print-tests-1):
Remove superfluous backslashes from regexp.
* test/lisp/emacs-lisp/rx-tests.el (rx-char-any):
Remove superfluous backslash from doc comment.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r-- | lisp/progmodes/cc-engine.el | 6 | ||||
-rw-r--r-- | lisp/progmodes/etags.el | 2 | ||||
-rw-r--r-- | lisp/progmodes/f90.el | 2 | ||||
-rw-r--r-- | lisp/progmodes/ruby-mode.el | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index fd669280994..cc3753a7ebd 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -8968,7 +8968,7 @@ This function might do hidden buffer changes." (setq at-decl-end (looking-at (cond ((eq context '<>) "[,>]") - ((not (memq context '(nil top))) "[,\)]") + ((not (memq context '(nil top))) "[,)]") (t "[,;]")))) ;; Now we've collected info about various characteristics of @@ -10321,7 +10321,7 @@ comment at the start of cc-engine.el for more info." ;; Check for `c-opt-block-decls-with-vars-key' ;; before the first paren. (c-syntactic-re-search-forward - (concat "[;=\(\[{]\\|\\(" + (concat "[;=([{]\\|\\(" c-opt-block-decls-with-vars-key "\\)") lim t t t) @@ -10329,7 +10329,7 @@ comment at the start of cc-engine.el for more info." (not (eq (char-before) ?_)) ;; Check that the first following paren is ;; the block. - (c-syntactic-re-search-forward "[;=\(\[{]" + (c-syntactic-re-search-forward "[;=([{]" lim t t t) (eq (char-before) ?{)))))) ;; The declaration doesn't have any of the diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index c2715be5370..910c320ab8f 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -1281,7 +1281,7 @@ buffer-local values of tags table format variables." ;; This regexp matches an explicit tag name or the place where ;; it would start. (while (re-search-forward - "[\f\t\n\r()=,; ]?\177\\\(?:\\([^\n\001]+\\)\001\\)?" + "[\f\t\n\r()=,; ]?\177\\(?:\\([^\n\001]+\\)\001\\)?" nil t) (push (prog1 (if (match-beginning 1) ;; There is an explicit tag name. diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index 3ec145b547e..9de80635e9f 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el @@ -648,7 +648,7 @@ forall\\|block\\|critical\\)\\)\\_>" \\|enumerator\\|procedure\\|\ logical\\|double[ \t]*precision\\|type[ \t]*(\\(?:\\sw\\|\\s_\\)+)\\|none\\)[ \t]*" (1 font-lock-keyword-face) (2 font-lock-type-face)) - '("\\_<\\(namelist\\|common\\)[ \t]*/\\(\\(?:\\sw\\|\\s_\\)+\\)?\/" + '("\\_<\\(namelist\\|common\\)[ \t]*/\\(\\(?:\\sw\\|\\s_\\)+\\)?/" (1 font-lock-keyword-face) (2 font-lock-constant-face nil t)) "\\_<else\\([ \t]*if\\|where\\)?\\_>" '("\\(&\\)[ \t]*\\(!\\|$\\)" (1 font-lock-keyword-face)) diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 707875d130d..5998ac8e395 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -1867,7 +1867,7 @@ It will be properly highlighted even when the call omits parens.") ("^[ \t]*def +\\(`\\)" (1 "_")) ;; Ternary operator colon followed by opening paren or bracket ;; (semi-important for indentation). - ("\\(:\\)\\(?:[\({]\\|\\[[^]]\\)" + ("\\(:\\)\\(?:[({]\\|\\[[^]]\\)" (1 (string-to-syntax "."))) ;; Regular expressions. Start with matching unescaped slash. ("\\(?:\\=\\|[^\\]\\)\\(?:\\\\\\\\\\)*\\(/\\)" |