emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/progmodes/cc-engine.el, v [EMACS_22_


From: Alan Mackenzie
Subject: [Emacs-diffs] Changes to emacs/lisp/progmodes/cc-engine.el, v [EMACS_22_BASE]
Date: Tue, 01 Apr 2008 21:41:22 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Branch:         EMACS_22_BASE
Changes by:     Alan Mackenzie <acmacm> 08/04/01 21:41:22

Index: cc-engine.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/cc-engine.el,v
retrieving revision 1.56.2.10
retrieving revision 1.56.2.11
diff -u -b -r1.56.2.10 -r1.56.2.11
--- cc-engine.el        19 Feb 2008 22:08:55 -0000      1.56.2.10
+++ cc-engine.el        1 Apr 2008 21:41:21 -0000       1.56.2.11
@@ -6333,7 +6333,8 @@
       ;; the searchable range.
       (let* ((macro-start (c-query-macro-start))
             (lim (max (or lim (point-min)) (or macro-start (point-min))))
-            before-lparen after-rparen)
+            before-lparen after-rparen
+            (pp-count-out 20)) ; Max number of paren/brace constructs before 
we give up
        (narrow-to-region lim (c-point 'eol))
 
        ;; Search backwards for the defun's argument list.  We give up if we
@@ -6355,7 +6356,8 @@
        ;; {
 
        (catch 'knr
-         (while t ; go round one paren/bracket construct each time round.
+         (while (> pp-count-out 0) ; go back one paren/bracket pair each time.
+           (setq pp-count-out (1- pp-count-out))
            (c-syntactic-skip-backward "^)]}")
            (cond ((eq (char-before) ?\))
                   (setq after-rparen (point)))




reply via email to

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