[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 3cf4c8d: * lisp/progmodes/cc-{defs, engine, langs,
From: |
Alan Mackenzie |
Subject: |
[Emacs-diffs] master 3cf4c8d: * lisp/progmodes/cc-{defs, engine, langs, vars}.el: Comment the use of "a\\`" |
Date: |
Mon, 2 Apr 2018 15:56:14 -0400 (EDT) |
branch: master
commit 3cf4c8d9eb1e560e08a9c98d81f9640affdd9ce9
Author: Alan Mackenzie <address@hidden>
Commit: Alan Mackenzie <address@hidden>
* lisp/progmodes/cc-{defs,engine,langs,vars}.el: Comment the use of "a\\`"
---
lisp/progmodes/cc-defs.el | 4 ++--
lisp/progmodes/cc-engine.el | 6 +++---
lisp/progmodes/cc-langs.el | 18 +++++++++---------
lisp/progmodes/cc-vars.el | 5 +++--
4 files changed, 17 insertions(+), 16 deletions(-)
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el
index ad9425a..7ec57e0 100644
--- a/lisp/progmodes/cc-defs.el
+++ b/lisp/progmodes/cc-defs.el
@@ -81,7 +81,7 @@
(progn
(require 'font-lock)
(let (font-lock-keywords)
- (font-lock-compile-keywords '("a\\`"))
+ (font-lock-compile-keywords '("a\\`")) ; doesn't match anything.
font-lock-keywords))))
@@ -1775,7 +1775,7 @@ when it's needed. The default is the current language
taken from
(t
re)))
- ;; Produce a regexp that matches nothing.
+ ;; Produce a regexp that doesn't match anything.
(if adorn
"\\(a\\`\\)"
"a\\`")))
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index ac1b462..d1380ff 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -870,7 +870,7 @@ comment at the start of cc-engine.el for more info."
stack
;; Regexp which matches "for", "if", etc.
(cond-key (or c-opt-block-stmt-key
- "a\\`")) ; Matches nothing.
+ "a\\`")) ; Doesn't match anything.
;; Return value.
(ret 'same)
;; Positions of the last three sexps or bounds we've stopped at.
@@ -8522,7 +8522,7 @@ comment at the start of cc-engine.el for more info."
;; Skip over type decl prefix operators. (Note similar code in
;; `c-forward-declarator'.)
(if (and c-recognize-typeless-decls
- (equal c-type-decl-prefix-key "a\\`"))
+ (equal c-type-decl-prefix-key "a\\`")) ; Regexp which doesn't
match
(when (eq (char-after) ?\()
(progn
(setq paren-depth (1+ paren-depth))
@@ -10154,7 +10154,7 @@ comment at the start of cc-engine.el for more info."
;; legal because it's part of a "compound keyword" like
;; "enum class". Of course, if c-after-brace-list-key
;; is nil, we can skip the test.
- (or (equal c-after-brace-list-key "a\\`")
+ (or (equal c-after-brace-list-key "a\\`") ; Regexp which doesn't
match
(save-match-data
(save-excursion
(not
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index 8fa253f..8671e18 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -1280,7 +1280,7 @@ operators."
(c--set-difference (c-lang-const c-assignment-operators)
'("=")
:test 'string-equal)))
- "a\\`"))
+ "a\\`")) ; Doesn't match anything.
(c-lang-defvar c-assignment-op-regexp
(c-lang-const c-assignment-op-regexp))
@@ -1503,7 +1503,7 @@ properly."
;; language)
t (if (c-lang-const c-block-comment-ender)
(regexp-quote (c-lang-const c-block-comment-ender))
- "a\\`"))
+ "a\\`")) ; Doesn't match anything.
(c-lang-defvar c-block-comment-ender-regexp
(c-lang-const c-block-comment-ender-regexp))
@@ -1522,7 +1522,7 @@ properly."
;; language)
t (if (c-lang-const c-block-comment-starter)
(regexp-quote (c-lang-const c-block-comment-starter))
- "a\\`"))
+ "a\\`")) ; Doesn't match anything.
(c-lang-defvar c-block-comment-start-regexp
(c-lang-const c-block-comment-start-regexp))
@@ -1531,7 +1531,7 @@ properly."
;; language; it does in all 7 CC Mode languages).
t (if (c-lang-const c-line-comment-starter)
(regexp-quote (c-lang-const c-line-comment-starter))
- "a\\`"))
+ "a\\`")) ; Doesn't match anything.
(c-lang-defvar c-line-comment-start-regexp
(c-lang-const c-line-comment-start-regexp))
@@ -1546,7 +1546,7 @@ properly."
(c-lang-defconst c-doc-comment-start-regexp
"Regexp to match the start of documentation comments."
- t "a\\`"
+ t "a\\`" ; Doesn't match anything.
;; From font-lock.el: `doxygen' uses /*! while others use /**.
(c c++ objc) "/\\*[*!]"
java "/\\*\\*"
@@ -3001,7 +3001,7 @@ Note that Java specific rules are currently applied to
tell this from
"Regexp matching a keyword that is followed by a colon, where
the whole construct can precede a declaration.
E.g. \"public:\" in C++."
- t "a\\`"
+ t "a\\`" ; Doesn't match anything.
c++ (c-make-keywords-re t (c-lang-const c-protection-kwds)))
(c-lang-defvar c-decl-start-colon-kwd-re
(c-lang-const c-decl-start-colon-kwd-re))
@@ -3379,7 +3379,7 @@ list."
(c-lang-defconst c-pre-id-bracelist-key
"A regexp matching tokens which, preceding an identifier, signify a
bracelist.
"
- t "a\\`"
+ t "a\\`" ; Doesn't match anything.
c++ "new\\([^[:alnum:]_$]\\|$\\)\\|&&?\\(\\S.\\|$\\)")
(c-lang-defvar c-pre-id-bracelist-key (c-lang-const c-pre-id-bracelist-key))
@@ -3435,7 +3435,7 @@ the invalidity of the putative template construct."
;; before the '{' of the enum list, to avoid searching too far.
"[^][{};/#=]*"
"{")
- "a\\`"))
+ "a\\`")) ; Doesn't match anything.
(c-lang-defvar c-enum-clause-introduction-re
(c-lang-const c-enum-clause-introduction-re))
@@ -3551,7 +3551,7 @@ i.e. before \":\". Only used if
`c-recognize-colon-labels' is set."
"Regexp matching things that can't occur two symbols before a colon in
a label construct. This catches C++'s inheritance construct \"class foo
: bar\". Only used if `c-recognize-colon-labels' is set."
- t "a\\`" ; matches nothing
+ t "a\\`" ; Doesn't match anything.
c++ (c-make-keywords-re t '("class")))
(c-lang-defvar c-nonlabel-token-2-key (c-lang-const c-nonlabel-token-2-key))
diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el
index fcb1cac..0475114 100644
--- a/lisp/progmodes/cc-vars.el
+++ b/lisp/progmodes/cc-vars.el
@@ -1647,6 +1647,7 @@ white space either before or after the operator, but not
both."
:type 'boolean
:group 'c)
+;; Initialize the next two to a regexp which never matches.
(defvar c-noise-macro-with-parens-name-re "a\\`")
(defvar c-noise-macro-name-re "a\\`")
@@ -1677,7 +1678,7 @@ These are recognized by CC Mode only in declarations."
;; Convert `c-noise-macro-names' and `c-noise-macro-with-parens-names' into
;; `c-noise-macro-name-re' and `c-noise-macro-with-parens-name-re'.
(setq c-noise-macro-with-parens-name-re
- (cond ((null c-noise-macro-with-parens-names) "a\\`")
+ (cond ((null c-noise-macro-with-parens-names) "a\\`") ; Never matches.
((consp c-noise-macro-with-parens-names)
(concat (regexp-opt c-noise-macro-with-parens-names t)
"\\([^[:alnum:]_$]\\|$\\)"))
@@ -1686,7 +1687,7 @@ These are recognized by CC Mode only in declarations."
(t (error "c-make-noise-macro-regexps: \
c-noise-macro-with-parens-names is invalid: %s"
c-noise-macro-with-parens-names))))
(setq c-noise-macro-name-re
- (cond ((null c-noise-macro-names) "a\\`")
+ (cond ((null c-noise-macro-names) "a\\`") ; Never matches anything.
((consp c-noise-macro-names)
(concat (regexp-opt c-noise-macro-names t)
"\\([^[:alnum:]_$]\\|$\\)"))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 3cf4c8d: * lisp/progmodes/cc-{defs, engine, langs, vars}.el: Comment the use of "a\\`",
Alan Mackenzie <=