mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 12:21:25 -08:00
Fix wrong bound to c-font-lock-declarators. Fixes bug #18948.
progmodes/cc-fonts.el (c-font-lock-declarations): Pass "(point-max)" as bound to c-font-lock-declarators, not "limit", as the buffer is sometimes narrowed to less than "limit" (e.g., in the presence of macros).
This commit is contained in:
parent
bd02f3d40e
commit
ceb7a7dfb8
2 changed files with 11 additions and 1 deletions
|
|
@ -1,3 +1,11 @@
|
|||
2014-11-05 Alan Mackenzie <acm@muc.de>
|
||||
|
||||
Fix wrong bound to c-font-lock-declarators. Fixes bug #18948.
|
||||
* progmodes/cc-fonts.el (c-font-lock-declarations): Pass
|
||||
"(point-max)" as bound to c-font-lock-declarators, not "limit", as
|
||||
the buffer is sometimes narrowed to less than "limit" (e.g., in
|
||||
the presence of macros).
|
||||
|
||||
2014-11-05 Michael Albinus <michael.albinus@gmx.de>
|
||||
|
||||
* net/tramp.el (tramp-error-with-buffer): Show connection buffer
|
||||
|
|
|
|||
|
|
@ -1279,6 +1279,8 @@ casts and declarations are fontified. Used on level 2 and higher."
|
|||
c-font-lock-maybe-decl-faces
|
||||
|
||||
(lambda (match-pos inside-macro)
|
||||
;; Note to maintainers: don't use `limit' inside this lambda form;
|
||||
;; c-find-decl-spots sometimes narrows to less than `limit'.
|
||||
(setq start-pos (point))
|
||||
(when
|
||||
;; The result of the form below is true when we don't recognize a
|
||||
|
|
@ -1507,7 +1509,7 @@ casts and declarations are fontified. Used on level 2 and higher."
|
|||
;; At a real declaration?
|
||||
(if (memq (c-forward-type t) '(t known found))
|
||||
(progn
|
||||
(c-font-lock-declarators limit t is-typedef)
|
||||
(c-font-lock-declarators (point-max) t is-typedef)
|
||||
nil)
|
||||
;; False alarm. Return t to go on to the next check.
|
||||
(goto-char start-pos)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue