aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mackenzie2013-10-27 21:24:17 +0000
committerAlan Mackenzie2013-10-27 21:24:17 +0000
commitb1e8e010610ae57027c84f2f7c2966baf8ef274d (patch)
treea189077db0078694ee0aae9b454634f7920cec3e
parenta94fc965f4d32cae0e9b93b8c8947612a540d1b9 (diff)
downloademacs-b1e8e010610ae57027c84f2f7c2966baf8ef274d.tar.gz
emacs-b1e8e010610ae57027c84f2f7c2966baf8ef274d.zip
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.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/progmodes/cc-engine.el15
2 files changed, 15 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 47d6463e188..b9541322ac0 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12013-10-27 Alan Mackenzie <acm@muc.de>
2
3 Indent statements in macros following "##" correctly.
4 * progmodes/cc-engine.el (c-crosses-statement-barrier-p): Modify
5 the "#" arm of a cond form to handle "#" and "##" operators.
6
12013-10-27 Nathan Trapuzzano <nbtrap@nbtrap.com> (tiny change) 72013-10-27 Nathan Trapuzzano <nbtrap@nbtrap.com> (tiny change)
2 8
3 * linum.el (linum-update-window): Fix boundary test (bug#13446). 9 * linum.el (linum-update-window): Fix boundary test (bug#13446).
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 8cdb3379f66..973ed916694 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -1261,12 +1261,15 @@ comment at the start of cc-engine.el for more info."
1261 ;; looking for more : and ?. 1261 ;; looking for more : and ?.
1262 (setq c-maybe-labelp nil 1262 (setq c-maybe-labelp nil
1263 skip-chars (substring c-stmt-delim-chars 0 -2))) 1263 skip-chars (substring c-stmt-delim-chars 0 -2)))
1264 ;; At a CPP construct? 1264 ;; At a CPP construct or a "#" or "##" operator?
1265 ((and c-opt-cpp-symbol (looking-at c-opt-cpp-symbol) 1265 ((and c-opt-cpp-symbol (looking-at c-opt-cpp-symbol))
1266 (save-excursion 1266 (if (save-excursion
1267 (forward-line 0) 1267 (skip-chars-backward " \t")
1268 (looking-at c-opt-cpp-prefix))) 1268 (and (bolp)
1269 (c-end-of-macro)) 1269 (or (bobp)
1270 (not (eq (char-before (1- (point))) ?\\)))))
1271 (c-end-of-macro)
1272 (skip-chars-forward c-opt-cpp-symbol)))
1270 ((memq (char-after) non-skip-list) 1273 ((memq (char-after) non-skip-list)
1271 (throw 'done (point))))) 1274 (throw 'done (point)))))
1272 ;; In trailing space after an as yet undetected virtual semicolon? 1275 ;; In trailing space after an as yet undetected virtual semicolon?