CC Mode. Fix AWK Mode fontification bug, remove some unused variables
* lisp/progmodes/cc-awk.el (awk-font-lock-keywords): Replace a hard use of c-preprocessor-face-name by an `eval' expression which evaluates it. * lisp/progmodes/cc-engine.el (c-in-knr-argdecl, c-laomib-put-cache) (c-laomib-fix-elt): Remove unused bound variables.
This commit is contained in:
parent
57d97bb170
commit
2f8a7bcdc8
2 changed files with 23 additions and 24 deletions
|
@ -1037,7 +1037,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)
|
||||
|
|
|
@ -10893,7 +10893,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)))
|
||||
|
||||
|
@ -11735,7 +11735,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)))
|
||||
|
||||
|
@ -11776,27 +11776,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
|
||||
|
|
Loading…
Add table
Reference in a new issue