emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master cc6a66b: Fix hang in CC Mode when ":" is typed afte


From: Alan Mackenzie
Subject: [Emacs-diffs] master cc6a66b: Fix hang in CC Mode when ":" is typed after identifier at EOB.
Date: Fri, 16 Jun 2017 06:45:13 -0400 (EDT)

branch: master
commit cc6a66b9a154b336a9a460b37ca843eb3b9e94f5
Author: Alan Mackenzie <address@hidden>
Commit: Alan Mackenzie <address@hidden>

    Fix hang in CC Mode when ":" is typed after identifier at EOB.
    
    * list/progmodes/cc-engine.el (c-forward-declarator): Fix coding error
    confusing ":" and EOB.
---
 lisp/progmodes/cc-engine.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 9773b1c..aa84ade 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -8100,7 +8100,7 @@ comment at the start of cc-engine.el for more info."
                          (and
                           (setq found
                                 (c-syntactic-re-search-forward
-                                 "[;:,]\\|\\s)\\|\\'\\|\\(=\\|\\s(\\)"
+                                 "[;:,]\\|\\s)\\|\\(=\\|\\s(\\)"
                                  limit t t))
                           (eq (char-before) ?:)
                           (if (looking-at c-:-op-cont-regexp)
@@ -8118,8 +8118,8 @@ comment at the start of cc-engine.el for more info."
                    (eq (char-before) ?\[)
                    (c-go-up-list-forward))
             (setq brackets-after-id t))
-          (backward-char)
-          found))
+          (when found (backward-char))
+          t))
        (list id-start id-end brackets-after-id (match-beginning 1) decorated)
 
       (goto-char here)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]