aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/textmodes
diff options
context:
space:
mode:
authorMattias EngdegÄrd2020-02-17 18:26:47 +0100
committerMattias EngdegÄrd2020-02-20 16:03:30 +0100
commit8dc4034ed6f86455c294f22a3d345b00cd4aa143 (patch)
tree62a6795b8918bda84fa682d102d685bcbf6ac1f1 /lisp/textmodes
parentd950a61fc8d14faf71e3b546c59a72b6f711b5df (diff)
downloademacs-8dc4034ed6f86455c294f22a3d345b00cd4aa143.tar.gz
emacs-8dc4034ed6f86455c294f22a3d345b00cd4aa143.zip
Add and remove backslashes in regexps
These irregularities were found by relint; see https://lists.gnu.org/archive/html/emacs-devel/2020-01/msg00949.html . * doc/lispref/modes.texi (Example Major Modes): * etc/srecode/el.srt: * lisp/cedet/data-debug.el (data-debug-mode): * lisp/cedet/semantic/grammar.el (semantic-grammar-mode): * lisp/cedet/srecode/srt-mode.el (srecode-template-mode): * lisp/comint.el (comint--unquote&requote-argument): * lisp/emacs-lisp/lisp-mode.el (lisp-mode): * lisp/gnus/mm-uu.el (mm-uu-type-alist): * lisp/progmodes/cc-awk.el (c-awk-harmless-pattern-characters*): * lisp/progmodes/cfengine.el (cfengine-common-settings): * lisp/progmodes/cperl-mode.el (cperl-after-sub-regexp, cperl-init-faces): * lisp/shell.el (shell-chdrive-regexp, shell--unquote&requote-argument): * lisp/textmodes/tex-mode.el (tex-common-initialization): Remove duplicated backslashes in character alternatives. * lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2): * lisp/progmodes/opascal.el (opascal--syntax-propertize): * lisp/progmodes/pascal.el (pascal--syntax-propertize): Remove backslashes escaping non-special characters. * lisp/progmodes/fortran.el (fortran-font-lock-keywords-3): Escape '*'. * lisp/progmodes/perl-mode.el (perl-syntax-propertize-function): Escape '^'.
Diffstat (limited to 'lisp/textmodes')
-rw-r--r--lisp/textmodes/tex-mode.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 0e28756ea75..f95979e2fcb 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -465,7 +465,7 @@ An alternative value is \" . \", if you use a font with a narrow period."
465; ("{\\\\bf\\([^}]+\\)}" 1 'bold keep) 465; ("{\\\\bf\\([^}]+\\)}" 1 'bold keep)
466; ("{\\\\\\(em\\|it\\|sl\\)\\([^}]+\\)}" 2 'italic keep) 466; ("{\\\\\\(em\\|it\\|sl\\)\\([^}]+\\)}" 2 'italic keep)
467; ("\\\\\\([a-zA-Z@]+\\|.\\)" . font-lock-keyword-face) 467; ("\\\\\\([a-zA-Z@]+\\|.\\)" . font-lock-keyword-face)
468; ("^[ \t\n]*\\\\def[\\\\@]\\(\\w+\\)" 1 font-lock-function-name-face keep)) 468; ("^[ \t\n]*\\\\def[\\@]\\(\\w+\\)" 1 font-lock-function-name-face keep))
469; ;; Rewritten and extended for LaTeX2e by Ulrik Dickow <dickow@nbi.dk>. 469; ;; Rewritten and extended for LaTeX2e by Ulrik Dickow <dickow@nbi.dk>.
470; '(("\\\\\\(begin\\|end\\|newcommand\\){\\([a-zA-Z0-9\\*]+\\)}" 470; '(("\\\\\\(begin\\|end\\|newcommand\\){\\([a-zA-Z0-9\\*]+\\)}"
471; 2 font-lock-function-name-face) 471; 2 font-lock-function-name-face)
@@ -1252,10 +1252,10 @@ Entering SliTeX mode runs the hook `text-mode-hook', then the hook
1252 ("\\\\[a-zA-Z]+\\( +\\|{}\\)[a-zA-Z]*" . "") 1252 ("\\\\[a-zA-Z]+\\( +\\|{}\\)[a-zA-Z]*" . "")
1253 ("%" . "$")))) 1253 ("%" . "$"))))
1254 ;; A line containing just $$ is treated as a paragraph separator. 1254 ;; A line containing just $$ is treated as a paragraph separator.
1255 (setq-local paragraph-start "[ \t]*$\\|[\f\\\\%]\\|[ \t]*\\$\\$") 1255 (setq-local paragraph-start "[ \t]*$\\|[\f\\%]\\|[ \t]*\\$\\$")
1256 ;; A line starting with $$ starts a paragraph, 1256 ;; A line starting with $$ starts a paragraph,
1257 ;; but does not separate paragraphs if it has more stuff on it. 1257 ;; but does not separate paragraphs if it has more stuff on it.
1258 (setq-local paragraph-separate "[ \t]*$\\|[\f\\\\%]\\|[ \t]*\\$\\$[ \t]*$") 1258 (setq-local paragraph-separate "[ \t]*$\\|[\f\\%]\\|[ \t]*\\$\\$[ \t]*$")
1259 (setq-local add-log-current-defun-function #'tex-current-defun-name) 1259 (setq-local add-log-current-defun-function #'tex-current-defun-name)
1260 (setq-local comment-start "%") 1260 (setq-local comment-start "%")
1261 (setq-local comment-add 1) 1261 (setq-local comment-add 1)