Commit 8a111d73 authored by Alan Mackenzie's avatar Alan Mackenzie
Browse files

CC Mode. Fix AWK Mode fontification bug, remove some unused variables

* cc-awk.el (awk-font-lock-keywords): Replace a hard use of
c-preprocessor-face-name by an `eval' expression which evaluates it.

* cc-engine.el (c-in-knr-argdecl, c-laomib-put-cache, c-laomib-fix-elt):
Remove unused bound variables.
parent 2ab971738b2c
......@@ -1040,7 +1040,7 @@ std\\(err\\|in\\|out\\)\\|user\\)\\)\\>\
0 c-preprocessor-face-name))
;; Directives
'("@\\(include\\|load\\|namespace\\)\\>" 0 c-preprocessor-face-name)
`(eval . '("@\\(include\\|load\\|namespace\\)\\>" 0 ,c-preprocessor-face-name))
;; gawk debugging keywords. (acm, 2002/7/21)
;; (Removed, 2003/6/6. These functions are now fontified as built-ins)
......
......@@ -10908,7 +10908,7 @@ comment at the start of cc-engine.el for more info."
(pp-count-out 20) ; Max number of paren/brace constructs before
; we give up.
ids ; List of identifiers in the parenthesized list.
id-start after-prec-token decl-or-cast decl-res
id-start after-prec-token decl-or-cast
c-last-identifier-range semi-position+1)
(narrow-to-region low-lim (or macro-end (point-max)))
 
......@@ -11747,7 +11747,7 @@ comment at the start of cc-engine.el for more info."
(new-elt (list lim start end result))
big-ptr
(cur-ptr c-laomib-cache)
togo togo-ptr (size 0) cur-size
togo (size 0) cur-size
)
(if old-elt (setq c-laomib-cache (delq old-elt c-laomib-cache)))
 
......@@ -11788,27 +11788,26 @@ comment at the start of cc-engine.el for more info."
((<= lwm (nth 2 elt))
nil)
(t
(let (cur-brace)
;; Search for the last brace in `paren-state' before (car `lim'). This
;; brace will become our new 2nd element of `elt'.
(while
;; Search one brace level per iteration.
(and paren-state
(progn
;; (setq cur-brace (c-laomib-next-BRACE paren-state))
(while
;; Go past non-brace levels, one per iteration.
(and paren-state
(not (eq (char-after
(c-state-cache-top-lparen paren-state))
?{)))
(setq paren-state (cdr paren-state)))
(cadr paren-state))
(> (c-state-cache-top-lparen (cdr paren-state)) (car elt)))
(setq paren-state (cdr paren-state)))
(when (cadr paren-state)
(setcar (cdr elt) (c-state-cache-top-lparen paren-state))
elt)))))
;; Search for the last brace in `paren-state' before (car `lim'). This
;; brace will become our new 2nd element of `elt'.
(while
;; Search one brace level per iteration.
(and paren-state
(progn
;; (setq cur-brace (c-laomib-next-BRACE paren-state))
(while
;; Go past non-brace levels, one per iteration.
(and paren-state
(not (eq (char-after
(c-state-cache-top-lparen paren-state))
?{)))
(setq paren-state (cdr paren-state)))
(cadr paren-state))
(> (c-state-cache-top-lparen (cdr paren-state)) (car elt)))
(setq paren-state (cdr paren-state)))
(when (cadr paren-state)
(setcar (cdr elt) (c-state-cache-top-lparen paren-state))
elt))))
 
(defun c-laomib-invalidate-cache (beg _end)
;; Called from late in c-before-change. Amend `c-laomib-cache' to remove
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment