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-cmds.el,v


From: Alan Mackenzie
Subject: [Emacs-diffs] Changes to emacs/lisp/progmodes/cc-cmds.el,v
Date: Fri, 30 Mar 2007 20:20:36 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Alan Mackenzie <acmacm> 07/03/30 20:20:35

Index: cc-cmds.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/cc-cmds.el,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -b -r1.54 -r1.55
--- cc-cmds.el  15 Feb 2007 22:31:52 -0000      1.54
+++ cc-cmds.el  30 Mar 2007 20:20:35 -0000      1.55
@@ -1477,9 +1477,7 @@
     (c-syntactic-re-search-forward "{")
     (backward-char)
     (setq n (1- n)))
-   (;; (or (eq where 'at-header) (eq where 'outwith-function)
-;;     (eq where 'at-function-end) (eq where 'in-trailer))
-    (memq where '(at-header outwith-function at-function-end in-trailer))
+   ((memq where '(at-header outwith-function at-function-end in-trailer))
     (c-syntactic-skip-backward "^}")
     (when (eq (char-before) ?\})
       (backward-sexp)
@@ -1526,8 +1524,7 @@
     (if (< arg 0)
        ;; Move forward to the closing brace of a function.
        (progn
-         (if ;; (or (eq where 'at-function-end) (eq where 'outwith-function))
-             (memq where '(at-function-end outwith-function))
+         (if (memq where '(at-function-end outwith-function))
              (setq arg (1+ arg)))
          (if (< arg 0)
              (setq arg (c-forward-to-nth-EOF-} (- arg) where)))
@@ -1587,13 +1584,11 @@
    ((eq where 'in-trailer)
     (c-syntactic-skip-backward "^}")
     (setq n (1- n)))
-   (;; (or (eq where 'at-function-end) (eq where 'outwith-function)
-;;     (eq where 'at-header) (eq where 'in-header))
-    (memq where '(at-function-end outwith-function at-header in-header))
-    (c-syntactic-re-search-forward "{")
+   ((memq where '(at-function-end outwith-function at-header in-header))
+    (when (c-syntactic-re-search-forward "{" nil 'eob)
     (backward-char)
     (forward-sexp)
-    (setq n (1- n)))
+      (setq n (1- n))))
    (t (error "c-forward-to-nth-EOF-}: `where' is %s" where)))
 
   ;; Each time round the loop, go forward to a "}" at the outermost level.
@@ -1631,8 +1626,7 @@
     (if (< arg 0)
        ;; Move backwards to the } of a function
        (progn
-         (if ;; (or (eq where 'at-header) (eq where 'outwith-function))
-             (memq where '(at-header outwith-function))
+         (if (memq where '(at-header outwith-function))
              (setq arg (1+ arg)))
          (if (< arg 0)
              (setq arg (c-backward-to-nth-BOF-{ (- arg) where)))




reply via email to

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