[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-24 r117672: Fix wrong bound to c-font-lock-declarato
From: |
Alan Mackenzie |
Subject: |
[Emacs-diffs] emacs-24 r117672: Fix wrong bound to c-font-lock-declarators. Fixes bug #18948. |
Date: |
Wed, 05 Nov 2014 17:59:27 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117672
revision-id: address@hidden
parent: address@hidden
committer: Alan Mackenzie <address@hidden>
branch nick: emacs-24
timestamp: Wed 2014-11-05 17:57:50 +0000
message:
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).
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/progmodes/cc-fonts.el ccfonts.el-20091113204419-o5vbwnq5f7feedwu-2930
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-11-05 11:24:04 +0000
+++ b/lisp/ChangeLog 2014-11-05 17:57:50 +0000
@@ -1,3 +1,11 @@
+2014-11-05 Alan Mackenzie <address@hidden>
+
+ 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 <address@hidden>
* net/tramp.el (tramp-error-with-buffer): Show connection buffer
=== modified file 'lisp/progmodes/cc-fonts.el'
--- a/lisp/progmodes/cc-fonts.el 2014-01-01 07:43:34 +0000
+++ b/lisp/progmodes/cc-fonts.el 2014-11-05 17:57:50 +0000
@@ -1279,6 +1279,8 @@
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 @@
;; 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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-24 r117672: Fix wrong bound to c-font-lock-declarators. Fixes bug #18948.,
Alan Mackenzie <=