diff options
author | Alan Mackenzie <acm@muc.de> | 2018-03-28 18:53:32 +0000 |
---|---|---|
committer | Alan Mackenzie <acm@muc.de> | 2018-03-28 18:53:32 +0000 |
commit | 3ccbe1f43f8c73b5dbf7051b91cd850959f2a79f (patch) | |
tree | 87bdec6856d9264855f735b238ee1e3e25a51f4b /lisp/progmodes/cc-vars.el | |
parent | c77d9ea0e70e68be4742ed9962058a14f5391f6b (diff) | |
download | emacs-3ccbe1f43f8c73b5dbf7051b91cd850959f2a79f.tar.gz |
Replace faulty non-matching regexp "\\<\\>" with "a\\`"
The regexp "\\<\\>", which is supposed never to match, actually matches, for
instance, where a Chinese character is directly followed by an ASCII letter.
So, replace it with "a\\`".
* lisp/progmodes/cc-defs.el (cc-fix, c-make-keywords-re)
* lisp/progmodes/cc-engine.el (c-beginning-of-statement-1)
(c-forward-<>-arglist-recur, c-forward-decl-or-cast-1)
(c-looking-at-decl-block)
* lisp/progmodes/cc-langs.el (c-assignment-op-regexp)
(c-block-comment-ender-regexp, c-block-comment-start-regexp)
(c-line-comment-start-regexp, c-doc-comment-start-regexp)
(c-decl-start-colon-kwd-re, c-type-decl-prefix-key)
(c-type-decl-operator-prefix-key, c-pre-id-bracelist-key)
(c-enum-clause-introduction-re, c-nonlabel-token-2-key)
* lisp/progmodes/cc-vars.el (c-noise-macro-with-parens-name-re)
(c-make-noise-macro-regexps):
Replace "\\<\\>" by "a\\`".
Diffstat (limited to 'lisp/progmodes/cc-vars.el')
-rw-r--r-- | lisp/progmodes/cc-vars.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el index ecf034846bd..fcb1cac0992 100644 --- a/lisp/progmodes/cc-vars.el +++ b/lisp/progmodes/cc-vars.el @@ -1647,8 +1647,8 @@ white space either before or after the operator, but not both." :type 'boolean :group 'c) -(defvar c-noise-macro-with-parens-name-re "\\<\\>") -(defvar c-noise-macro-name-re "\\<\\>") +(defvar c-noise-macro-with-parens-name-re "a\\`") +(defvar c-noise-macro-name-re "a\\`") (defcustom c-noise-macro-names nil "A list of names of macros which expand to nothing, or compiler extensions @@ -1677,7 +1677,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) "\\<\\>") + (cond ((null c-noise-macro-with-parens-names) "a\\`") ((consp c-noise-macro-with-parens-names) (concat (regexp-opt c-noise-macro-with-parens-names t) "\\([^[:alnum:]_$]\\|$\\)")) @@ -1686,7 +1686,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) "\\<\\>") + (cond ((null c-noise-macro-names) "a\\`") ((consp c-noise-macro-names) (concat (regexp-opt c-noise-macro-names t) "\\([^[:alnum:]_$]\\|$\\)")) |