summaryrefslogtreecommitdiff
path: root/lisp/progmodes/cc-fonts.el
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/progmodes/cc-fonts.el
parentd149ff5233805c0a09b6067e0cf27549291cc83a (diff)
downloademacs-284c470ef752967fcd8bae6a450dc138462b1e49.tar.gz
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/progmodes/cc-fonts.el')
-rw-r--r--lisp/progmodes/cc-fonts.el14
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index f05d6a06595..ad112d720d8 100644
--- a/lisp/progmodes/cc-fonts.el
+++ b/lisp/progmodes/cc-fonts.el
@@ -575,10 +575,10 @@ stuff. Used on level 1 and higher."
c-symbol-key) "\\)"
(concat "\\(" ; 2 + ncle + nsws + c-sym-key
;; Macro with arguments - a "function".
- "\\(\(\\)" ; 3 + ncle + nsws + c-sym-key
+ "\\((\\)" ; 3 + ncle + nsws + c-sym-key
"\\|"
;; Macro without arguments - a "variable".
- "\\([^\(]\\|$\\)"
+ "\\([^(]\\|$\\)"
"\\)"))
`((if (match-beginning
,(+ 3 ncle-depth nsws-depth
@@ -1082,7 +1082,7 @@ casts and declarations are fontified. Used on level 2 and higher."
;; Search syntactically to the end of the declarator (";",
;; ",", a closing paren, eob etc) or to the beginning of an
- ;; initializer or function prototype ("=" or "\\s\(").
+ ;; initializer or function prototype ("=" or "\\s(").
;; Note that square brackets are now not also treated as
;; initializers, since this broke when there were also
;; initializing brace lists.
@@ -1867,7 +1867,7 @@ higher."
"\\)\\>"
;; Disallow various common punctuation chars that can't come
;; before the '{' of the enum list, to avoid searching too far.
- "[^\]\[{}();/#=]*"
+ "[^][{}();/#=]*"
"{")
'((c-font-lock-declarators limit t nil)
(save-match-data
@@ -2112,7 +2112,7 @@ need for `c-font-lock-extra-types'.")
(unless (looking-at
(cc-eval-when-compile
(concat (c-lang-const c-symbol-start c++)
- "\\|[*:\)\[]")))
+ "\\|[*:)[]")))
;; There's something after the would-be type that
;; can't be there, so this is a placement arglist.
(setq expr1-res nil)))
@@ -2122,7 +2122,7 @@ need for `c-font-lock-extra-types'.")
(unless (looking-at
(cc-eval-when-compile
(concat (c-lang-const c-symbol-start c++)
- "\\|[*:\)\[]")))
+ "\\|[*:)[]")))
;; There's something after the would-be type that can't
;; be there, so this is an initialization expression.
(setq expr2-res nil))
@@ -2675,7 +2675,7 @@ need for `pike-font-lock-extra-types'.")
nil)
(defconst autodoc-font-lock-doc-comments
- `(("@\\(\\w+{\\|\\[\\([^\]@\n\r]\\|@@\\)*\\]\\|[@}]\\|$\\)"
+ `(("@\\(\\w+{\\|\\[\\([^]@\n\r]\\|@@\\)*\\]\\|[@}]\\|$\\)"
;; In-text markup.
0 ,c-doc-markup-face-name prepend nil)
(autodoc-font-lock-line-markup)