]> code.delx.au - gnu-emacs-elpa/commit
* sm-c-mode.el: Auto-align backslashes. Improve indent rules
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 24 Nov 2015 13:29:25 +0000 (08:29 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 24 Nov 2015 13:29:25 +0000 (08:29 -0500)
commitd16cc527fbdab0e42642db827f12984be916dba2
tree7f3356cc52f32a152446943ed83049622b6f3299
parenta624a3316ee2393e39c0aaa28845cdf3eed24cb4
* sm-c-mode.el: Auto-align backslashes.  Improve indent rules

* sm-c-mode/sm-c-mode.el: Auto-align backslashes.  Improve indent rules.
(sm-c--cpp-indent-comment-inside): New function.
(sm-c--cpp-smie-indent-functions): Use it.
(sm-c--cpp-smie-indent): Handle indentation within comments-within-cpp.
(sm-c-smie-grammar): Manually tweak precedence of ":label".
(sm-c-smie-operator-regexp): Parentheses aren't operators.
(sm-c--boi): Add `inner' arg.
(sm-c--boe): Complete the code.
(sm-c-smie--*-token): Refine.
(sm-c-smie-rules): Various tweaks based on tests on src/eval.c and
src/xdisp.c.
(sm-c--bs-changed): New var.
(sm-c--bs-after-change, sm-c--bs-realign, sm-c--bs-realign-1):
New functions.
(sm-c-mode): Use them.

* sm-c-mode/sm-c-mode-test.c: Add a few more cases.
packages/sm-c-mode/sm-c-mode-test.c
packages/sm-c-mode/sm-c-mode.el