diff options
| author | Mattias EngdegÄrd | 2019-03-16 11:36:38 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-03-16 11:38:58 -0700 |
| commit | 8832cc5f91a420db6bea65f381a3fb3597eb7523 (patch) | |
| tree | 48a0189439e5da055b0431428d583694f1dd75c8 /lisp | |
| parent | 34dd4e0a83e19882f61c9a2ac99ecc12632d13d4 (diff) | |
| download | emacs-8832cc5f91a420db6bea65f381a3fb3597eb7523.tar.gz emacs-8832cc5f91a420db6bea65f381a3fb3597eb7523.zip | |
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')
| -rw-r--r-- | lisp/auth-source-pass.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/nnmail.el | 2 | ||||
| -rw-r--r-- | lisp/org/ob-abc.el | 4 | ||||
| -rw-r--r-- | lisp/org/ob-forth.el | 2 | ||||
| -rw-r--r-- | lisp/org/org-list.el | 2 | ||||
| -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 | ||||
| -rw-r--r-- | lisp/textmodes/artist.el | 2 | ||||
| -rw-r--r-- | lisp/vc/vc-git.el | 2 |
11 files changed, 14 insertions, 14 deletions
diff --git a/lisp/auth-source-pass.el b/lisp/auth-source-pass.el index e37cadb07c1..deb805a6e1a 100644 --- a/lisp/auth-source-pass.el +++ b/lisp/auth-source-pass.el | |||
| @@ -189,7 +189,7 @@ often." | |||
| 189 | (let ((store-dir (expand-file-name "~/.password-store/"))) | 189 | (let ((store-dir (expand-file-name "~/.password-store/"))) |
| 190 | (mapcar | 190 | (mapcar |
| 191 | (lambda (file) (file-name-sans-extension (file-relative-name file store-dir))) | 191 | (lambda (file) (file-name-sans-extension (file-relative-name file store-dir))) |
| 192 | (directory-files-recursively store-dir "\.gpg$")))) | 192 | (directory-files-recursively store-dir "\\.gpg$")))) |
| 193 | 193 | ||
| 194 | (defun auth-source-pass--find-all-by-entry-name (entryname user) | 194 | (defun auth-source-pass--find-all-by-entry-name (entryname user) |
| 195 | "Search the store for all entries either matching ENTRYNAME/USER or ENTRYNAME. | 195 | "Search the store for all entries either matching ENTRYNAME/USER or ENTRYNAME. |
diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el index f6d75252930..a95cdb4a4f8 100644 --- a/lisp/gnus/nnmail.el +++ b/lisp/gnus/nnmail.el | |||
| @@ -489,7 +489,7 @@ Example: | |||
| 489 | (from . "from\\|sender\\|resent-from") | 489 | (from . "from\\|sender\\|resent-from") |
| 490 | (nato . "to\\|cc\\|resent-to\\|resent-cc") | 490 | (nato . "to\\|cc\\|resent-to\\|resent-cc") |
| 491 | (naany . "from\\|to\\|cc\\|sender\\|resent-from\\|resent-to\\|resent-cc") | 491 | (naany . "from\\|to\\|cc\\|sender\\|resent-from\\|resent-to\\|resent-cc") |
| 492 | (list . "list-id\\|list-post\\|x-mailing-list\||x-beenthere\\|x-loop")) | 492 | (list . "list-id\\|list-post\\|x-mailing-list\\|x-beenthere\\|x-loop")) |
| 493 | "Alist of abbreviations allowed in `nnmail-split-fancy'." | 493 | "Alist of abbreviations allowed in `nnmail-split-fancy'." |
| 494 | :group 'nnmail-split | 494 | :group 'nnmail-split |
| 495 | :type '(repeat (cons :format "%v" symbol regexp))) | 495 | :type '(repeat (cons :format "%v" symbol regexp))) |
diff --git a/lisp/org/ob-abc.el b/lisp/org/ob-abc.el index cefbe716e15..43ee1d9921b 100644 --- a/lisp/org/ob-abc.el +++ b/lisp/org/ob-abc.el | |||
| @@ -47,7 +47,7 @@ | |||
| 47 | (value (cdr pair))) | 47 | (value (cdr pair))) |
| 48 | (setq body | 48 | (setq body |
| 49 | (replace-regexp-in-string | 49 | (replace-regexp-in-string |
| 50 | (concat "\$" (regexp-quote name)) | 50 | (concat "\\$" (regexp-quote name)) |
| 51 | (if (stringp value) value (format "%S" value)) | 51 | (if (stringp value) value (format "%S" value)) |
| 52 | body)))) | 52 | body)))) |
| 53 | vars) | 53 | vars) |
| @@ -59,7 +59,7 @@ | |||
| 59 | (message "executing Abc source code block") | 59 | (message "executing Abc source code block") |
| 60 | (let* ((cmdline (cdr (assq :cmdline params))) | 60 | (let* ((cmdline (cdr (assq :cmdline params))) |
| 61 | (out-file (let ((file (cdr (assq :file params)))) | 61 | (out-file (let ((file (cdr (assq :file params)))) |
| 62 | (if file (replace-regexp-in-string "\.pdf$" ".ps" file) | 62 | (if file (replace-regexp-in-string "\\.pdf$" ".ps" file) |
| 63 | (error "abc code block requires :file header argument")))) | 63 | (error "abc code block requires :file header argument")))) |
| 64 | (in-file (org-babel-temp-file "abc-")) | 64 | (in-file (org-babel-temp-file "abc-")) |
| 65 | (render (concat "abcm2ps" " " cmdline | 65 | (render (concat "abcm2ps" " " cmdline |
diff --git a/lisp/org/ob-forth.el b/lisp/org/ob-forth.el index 8ca292656a2..88ed964fd77 100644 --- a/lisp/org/ob-forth.el +++ b/lisp/org/ob-forth.el | |||
| @@ -53,7 +53,7 @@ This function is called by `org-babel-execute-src-block'" | |||
| 53 | (defun org-babel-forth-session-execute (body params) | 53 | (defun org-babel-forth-session-execute (body params) |
| 54 | (require 'forth-mode) | 54 | (require 'forth-mode) |
| 55 | (let ((proc (forth-proc)) | 55 | (let ((proc (forth-proc)) |
| 56 | (rx " \\(\n:\\|compiled\n\\\|ok\n\\)") | 56 | (rx " \\(\n:\\|compiled\n\\|ok\n\\)") |
| 57 | (result-start)) | 57 | (result-start)) |
| 58 | (with-current-buffer (process-buffer (forth-proc)) | 58 | (with-current-buffer (process-buffer (forth-proc)) |
| 59 | (mapcar (lambda (line) | 59 | (mapcar (lambda (line) |
diff --git a/lisp/org/org-list.el b/lisp/org/org-list.el index ef85b402f08..22692d224a8 100644 --- a/lisp/org/org-list.el +++ b/lisp/org/org-list.el | |||
| @@ -236,7 +236,7 @@ into | |||
| 236 | 236 | ||
| 237 | (defcustom org-plain-list-ordered-item-terminator t | 237 | (defcustom org-plain-list-ordered-item-terminator t |
| 238 | "The character that makes a line with leading number an ordered list item. | 238 | "The character that makes a line with leading number an ordered list item. |
| 239 | Valid values are ?. and ?\). To get both terminators, use t. | 239 | Valid values are ?. and ?\\). To get both terminators, use t. |
| 240 | 240 | ||
| 241 | This variable needs to be set before org.el is loaded. If you | 241 | This variable needs to be set before org.el is loaded. If you |
| 242 | need to make a change while Emacs is running, use the customize | 242 | need to make a change while Emacs is running, use the customize |
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." | |||
| 8968 | 8968 | ||
| 8969 | (setq at-decl-end | 8969 | (setq at-decl-end |
| 8970 | (looking-at (cond ((eq context '<>) "[,>]") | 8970 | (looking-at (cond ((eq context '<>) "[,>]") |
| 8971 | ((not (memq context '(nil top))) "[,\)]") | 8971 | ((not (memq context '(nil top))) "[,)]") |
| 8972 | (t "[,;]")))) | 8972 | (t "[,;]")))) |
| 8973 | 8973 | ||
| 8974 | ;; Now we've collected info about various characteristics of | 8974 | ;; Now we've collected info about various characteristics of |
| @@ -10321,7 +10321,7 @@ comment at the start of cc-engine.el for more info." | |||
| 10321 | ;; Check for `c-opt-block-decls-with-vars-key' | 10321 | ;; Check for `c-opt-block-decls-with-vars-key' |
| 10322 | ;; before the first paren. | 10322 | ;; before the first paren. |
| 10323 | (c-syntactic-re-search-forward | 10323 | (c-syntactic-re-search-forward |
| 10324 | (concat "[;=\(\[{]\\|\\(" | 10324 | (concat "[;=([{]\\|\\(" |
| 10325 | c-opt-block-decls-with-vars-key | 10325 | c-opt-block-decls-with-vars-key |
| 10326 | "\\)") | 10326 | "\\)") |
| 10327 | lim t t t) | 10327 | lim t t t) |
| @@ -10329,7 +10329,7 @@ comment at the start of cc-engine.el for more info." | |||
| 10329 | (not (eq (char-before) ?_)) | 10329 | (not (eq (char-before) ?_)) |
| 10330 | ;; Check that the first following paren is | 10330 | ;; Check that the first following paren is |
| 10331 | ;; the block. | 10331 | ;; the block. |
| 10332 | (c-syntactic-re-search-forward "[;=\(\[{]" | 10332 | (c-syntactic-re-search-forward "[;=([{]" |
| 10333 | lim t t t) | 10333 | lim t t t) |
| 10334 | (eq (char-before) ?{)))))) | 10334 | (eq (char-before) ?{)))))) |
| 10335 | ;; The declaration doesn't have any of the | 10335 | ;; 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." | |||
| 1281 | ;; This regexp matches an explicit tag name or the place where | 1281 | ;; This regexp matches an explicit tag name or the place where |
| 1282 | ;; it would start. | 1282 | ;; it would start. |
| 1283 | (while (re-search-forward | 1283 | (while (re-search-forward |
| 1284 | "[\f\t\n\r()=,; ]?\177\\\(?:\\([^\n\001]+\\)\001\\)?" | 1284 | "[\f\t\n\r()=,; ]?\177\\(?:\\([^\n\001]+\\)\001\\)?" |
| 1285 | nil t) | 1285 | nil t) |
| 1286 | (push (prog1 (if (match-beginning 1) | 1286 | (push (prog1 (if (match-beginning 1) |
| 1287 | ;; There is an explicit tag name. | 1287 | ;; 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\\)\\)\\_>" | |||
| 648 | \\|enumerator\\|procedure\\|\ | 648 | \\|enumerator\\|procedure\\|\ |
| 649 | logical\\|double[ \t]*precision\\|type[ \t]*(\\(?:\\sw\\|\\s_\\)+)\\|none\\)[ \t]*" | 649 | logical\\|double[ \t]*precision\\|type[ \t]*(\\(?:\\sw\\|\\s_\\)+)\\|none\\)[ \t]*" |
| 650 | (1 font-lock-keyword-face) (2 font-lock-type-face)) | 650 | (1 font-lock-keyword-face) (2 font-lock-type-face)) |
| 651 | '("\\_<\\(namelist\\|common\\)[ \t]*/\\(\\(?:\\sw\\|\\s_\\)+\\)?\/" | 651 | '("\\_<\\(namelist\\|common\\)[ \t]*/\\(\\(?:\\sw\\|\\s_\\)+\\)?/" |
| 652 | (1 font-lock-keyword-face) (2 font-lock-constant-face nil t)) | 652 | (1 font-lock-keyword-face) (2 font-lock-constant-face nil t)) |
| 653 | "\\_<else\\([ \t]*if\\|where\\)?\\_>" | 653 | "\\_<else\\([ \t]*if\\|where\\)?\\_>" |
| 654 | '("\\(&\\)[ \t]*\\(!\\|$\\)" (1 font-lock-keyword-face)) | 654 | '("\\(&\\)[ \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.") | |||
| 1867 | ("^[ \t]*def +\\(`\\)" (1 "_")) | 1867 | ("^[ \t]*def +\\(`\\)" (1 "_")) |
| 1868 | ;; Ternary operator colon followed by opening paren or bracket | 1868 | ;; Ternary operator colon followed by opening paren or bracket |
| 1869 | ;; (semi-important for indentation). | 1869 | ;; (semi-important for indentation). |
| 1870 | ("\\(:\\)\\(?:[\({]\\|\\[[^]]\\)" | 1870 | ("\\(:\\)\\(?:[({]\\|\\[[^]]\\)" |
| 1871 | (1 (string-to-syntax "."))) | 1871 | (1 (string-to-syntax "."))) |
| 1872 | ;; Regular expressions. Start with matching unescaped slash. | 1872 | ;; Regular expressions. Start with matching unescaped slash. |
| 1873 | ("\\(?:\\=\\|[^\\]\\)\\(?:\\\\\\\\\\)*\\(/\\)" | 1873 | ("\\(?:\\=\\|[^\\]\\)\\(?:\\\\\\\\\\)*\\(/\\)" |
diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el index d75a1ca2f92..e9b17795a92 100644 --- a/lisp/textmodes/artist.el +++ b/lisp/textmodes/artist.el | |||
| @@ -2895,7 +2895,7 @@ Returns a list of strings." | |||
| 2895 | dir-list) | 2895 | dir-list) |
| 2896 | (mapcar | 2896 | (mapcar |
| 2897 | (lambda (file) | 2897 | (lambda (file) |
| 2898 | (replace-regexp-in-string "\.flf\\'" "" file)) | 2898 | (replace-regexp-in-string "\\.flf\\'" "" file)) |
| 2899 | result)))) | 2899 | result)))) |
| 2900 | 2900 | ||
| 2901 | (defun artist-figlet-choose-font () | 2901 | (defun artist-figlet-choose-font () |
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index c6806ba5cd4..c990b0659d2 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el | |||
| @@ -253,7 +253,7 @@ The following place holders should be present in the string: | |||
| 253 | ;; Git for Windows appends ".windows.N" to the | 253 | ;; Git for Windows appends ".windows.N" to the |
| 254 | ;; numerical version reported by Git. | 254 | ;; numerical version reported by Git. |
| 255 | (string-match | 255 | (string-match |
| 256 | "git version \\([0-9.]+\\)\\(\.windows.[0-9]+\\)?$" | 256 | "git version \\([0-9.]+\\)\\(\\.windows.[0-9]+\\)?$" |
| 257 | version-string)) | 257 | version-string)) |
| 258 | (match-string 1 version-string) | 258 | (match-string 1 version-string) |
| 259 | "0"))))) | 259 | "0"))))) |