emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r114826: Indent statements in macros following "##"


From: Alan Mackenzie
Subject: [Emacs-diffs] trunk r114826: Indent statements in macros following "##" correctly.
Date: Sun, 27 Oct 2013 21:27:22 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 114826
revision-id: address@hidden
parent: address@hidden
committer: Alan Mackenzie <address@hidden>
branch nick: trunk
timestamp: Sun 2013-10-27 21:24:17 +0000
message:
  Indent statements in macros following "##" correctly.
  * progmodes/cc-engine.el (c-crosses-statement-barrier-p): Modify
  the "#" arm of a cond form to handle "#" and "##" operators.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/progmodes/cc-engine.el    
ccengine.el-20091113204419-o5vbwnq5f7feedwu-1227
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-10-27 18:46:47 +0000
+++ b/lisp/ChangeLog    2013-10-27 21:24:17 +0000
@@ -1,3 +1,9 @@
+2013-10-27  Alan Mackenzie  <address@hidden>
+
+       Indent statements in macros following "##" correctly.
+       * progmodes/cc-engine.el (c-crosses-statement-barrier-p): Modify
+       the "#" arm of a cond form to handle "#" and "##" operators.
+
 2013-10-27  Nathan Trapuzzano  <address@hidden>  (tiny change)
 
        * linum.el (linum-update-window): Fix boundary test (bug#13446).

=== modified file 'lisp/progmodes/cc-engine.el'
--- a/lisp/progmodes/cc-engine.el       2013-10-20 14:27:22 +0000
+++ b/lisp/progmodes/cc-engine.el       2013-10-27 21:24:17 +0000
@@ -1261,12 +1261,15 @@
              ;; looking for more : and ?.
              (setq c-maybe-labelp nil
                    skip-chars (substring c-stmt-delim-chars 0 -2)))
-            ;; At a CPP construct?
-            ((and c-opt-cpp-symbol (looking-at c-opt-cpp-symbol)
-                  (save-excursion
-                    (forward-line 0)
-                    (looking-at c-opt-cpp-prefix)))
-             (c-end-of-macro))
+            ;; At a CPP construct or a "#" or "##" operator?
+            ((and c-opt-cpp-symbol (looking-at c-opt-cpp-symbol))
+             (if (save-excursion
+                   (skip-chars-backward " \t")
+                   (and (bolp)
+                        (or (bobp)
+                            (not (eq (char-before (1- (point))) ?\\)))))
+                 (c-end-of-macro)
+               (skip-chars-forward c-opt-cpp-symbol)))
             ((memq (char-after) non-skip-list)
              (throw 'done (point)))))
          ;; In trailing space after an as yet undetected virtual semicolon?


reply via email to

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