summaryrefslogtreecommitdiff
path: root/lisp/progmodes/cc-vars.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/cc-vars.el')
-rw-r--r--lisp/progmodes/cc-vars.el17
1 files changed, 11 insertions, 6 deletions
diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el
index 30475d0ba60..79bd6a92950 100644
--- a/lisp/progmodes/cc-vars.el
+++ b/lisp/progmodes/cc-vars.el
@@ -1115,7 +1115,7 @@ can always override the use of `c-default-style' by making calls to
;; Anchor pos: At the brace list decl start(*).
(brace-list-intro . +)
;; Anchor pos: At the brace list decl start(*).
- (brace-list-entry . c-lineup-under-anchor)
+ (brace-list-entry . 0)
;; Anchor pos: At the first non-ws char after the open paren if
;; the first token is on the same line, otherwise boi at that
;; token.
@@ -1210,7 +1210,7 @@ can always override the use of `c-default-style' by making calls to
(template-args-cont . (c-lineup-template-args +))
;; Anchor pos: Boi at the decl start. This might be changed;
;; the logical position is clearly the opening '<'.
- (inlambda . c-lineup-inexpr-block)
+ (inlambda . 0)
;; Anchor pos: None.
(lambda-intro-cont . +)
;; Anchor pos: Boi at the lambda start.
@@ -1647,8 +1647,11 @@ 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 "\\<\\>")
+;; Initialize the next two to a regexp which never matches.
+(defvar c-noise-macro-with-parens-name-re regexp-unmatchable)
+(make-variable-buffer-local 'c-noise-macro-with-parens-name-re)
+(defvar c-noise-macro-name-re regexp-unmatchable)
+(make-variable-buffer-local 'c-noise-macro-name-re)
(defcustom c-noise-macro-names nil
"A list of names of macros which expand to nothing, or compiler extensions
@@ -1663,6 +1666,7 @@ this implicitly by reinitializing C/C++/Objc Mode on any buffer)."
:type '(repeat :tag "List of names" string)
:group 'c)
(put 'c-noise-macro-names 'safe-local-variable #'c-string-list-p)
+(make-variable-buffer-local 'c-noise-macro-names)
(defcustom c-noise-macro-with-parens-names nil
"A list of names of macros \(or compiler extensions like \"__attribute__\")
@@ -1672,12 +1676,13 @@ These are recognized by CC Mode only in declarations."
:type '(repeat :tag "List of names (possibly empty)" string)
:group 'c)
(put 'c-noise-macro-with-parens-names 'safe-local-variable #'c-string-list-p)
+(make-variable-buffer-local 'c-noise-macro-with-parens-names)
(defun c-make-noise-macro-regexps ()
;; 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) regexp-unmatchable)
((consp c-noise-macro-with-parens-names)
(concat (regexp-opt c-noise-macro-with-parens-names t)
"\\([^[:alnum:]_$]\\|$\\)"))
@@ -1686,7 +1691,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) regexp-unmatchable)
((consp c-noise-macro-names)
(concat (regexp-opt c-noise-macro-names t)
"\\([^[:alnum:]_$]\\|$\\)"))