emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r103364: (c-end-of-statement): Set ma


From: Alan Mackenzie
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r103364: (c-end-of-statement): Set macro-end correctly at the end of a loop.
Date: Sun, 20 Feb 2011 18:36:29 +0000
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 103364
committer: Alan Mackenzie <address@hidden>
branch nick: trunk
timestamp: Sun 2011-02-20 18:36:29 +0000
message:
  (c-end-of-statement): Set macro-end correctly at the end of a loop.
modified:
  lisp/progmodes/cc-cmds.el
=== modified file 'lisp/progmodes/cc-cmds.el'
--- a/lisp/progmodes/cc-cmds.el 2011-01-31 23:54:50 +0000
+++ b/lisp/progmodes/cc-cmds.el 2011-02-20 18:36:29 +0000
@@ -2654,14 +2654,19 @@
                ;; Are we about to move forward into or out of a
                ;; preprocessor command?
                (when (eq (cdr res) 'macro-boundary)
-                 (save-excursion
-                   (end-of-line)
-                   (setq macro-fence
-                         (and (not (eobp))
-                              (progn (c-skip-ws-forward)
-                                     (c-beginning-of-macro))
-                              (progn (c-end-of-macro)
-                                     (point))))))
+                 (setq macro-fence
+                       (save-excursion
+                         (if macro-fence
+                             (progn
+                               (end-of-line)
+                               (and (not (eobp))
+                                    (progn (c-skip-ws-forward)
+                                           (c-beginning-of-macro))
+                                    (progn (c-end-of-macro)
+                                           (point))))
+                           (and (not (eobp))
+                                (c-beginning-of-macro)
+                                (progn (c-end-of-macro) (point)))))))
                ;; Are we about to move forward into a literal?
                (when (memq (cdr res) '(macro-boundary literal))
                  (setq range (c-ascertain-following-literal)))


reply via email to

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