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


From: Alan Mackenzie
Subject: [Emacs-diffs] Changes to emacs/lisp/progmodes/cc-engine.el,v
Date: Fri, 07 Mar 2008 22:34:10 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Alan Mackenzie <acmacm> 08/03/07 22:34:10

Index: cc-engine.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/cc-engine.el,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -b -r1.66 -r1.67
--- cc-engine.el        24 Feb 2008 10:08:51 -0000      1.66
+++ cc-engine.el        7 Mar 2008 22:34:09 -0000       1.67
@@ -6336,7 +6336,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
@@ -6358,7 +6359,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]