From 667ced3a2d224b0f2ab3f2da26468791252c234a Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Tue, 7 Feb 2012 12:01:42 +0000 Subject: [PATCH] cc-engine.el (c-forward-objc-directive): Prevent looping in "#pragma mark @implementation". --- lisp/ChangeLog | 5 +++++ lisp/progmodes/cc-engine.el | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e04126bf4ee..0a65a759b7f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-02-07 Alan Mackenzie + + * progmodes/cc-engine.el (c-forward-objc-directive): Prevent + looping in "#pragma mark @implementation". + 2012-02-07 Michael Albinus * notifications.el (notifications-on-closed-signal): Make `reason' diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 52f18a89849..47ceec309f4 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -7396,6 +7396,7 @@ comment at the start of cc-engine.el for more info." (let ((start (point)) start-char (c-promote-possible-types t) + lim ;; Turn off recognition of angle bracket arglists while parsing ;; types here since the protocol reference list might then be ;; considered part of the preceding name or superclass-name. @@ -7423,6 +7424,7 @@ comment at the start of cc-engine.el for more info." ; (c-forward-token-2) ; 2006/1/13 This doesn't move if the token's ; at EOB. (goto-char (match-end 0)) + (setq lim (point)) (c-skip-ws-forward) (c-forward-type)) @@ -7447,7 +7449,7 @@ comment at the start of cc-engine.el for more info." t)))) (progn - (c-backward-syntactic-ws) + (c-backward-syntactic-ws lim) (c-clear-c-type-property start (1- (point)) 'c-decl-end) (c-put-c-type-property (1- (point)) 'c-decl-end) t) -- 2.39.2