GNU bug report logs -
#17955
24.3.92; octave.el: indentation following ... or \
Previous Next
Reported by: Leo Liu <sdl.web <at> gmail.com>
Date: Sun, 6 Jul 2014 09:38:02 UTC
Severity: minor
Tags: fixed
Found in version 24.3.92
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 17955 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> So you should be able to control indentation of "b" above by tweaking
> the (:after . "=") or (:before . "=") rule.
I've never played around with the SMIE indentation before, but looking
at other examples, I came up with this:
diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el
index a1a5192ee1..5d877fc6ba 100644
--- a/lisp/progmodes/octave.el
+++ b/lisp/progmodes/octave.el
@@ -460,7 +460,8 @@ octave-smie-rules
(smie-rule-parent octave-block-offset)
;; For (invalid) code between switch and case.
;; (if (smie-rule-parent-p "switch") 4)
- nil))))
+ nil))
+ ('(:after . "=") octave-block-offset)))
(defun octave-indent-comment ()
"A function for `smie-indent-functions' (which see)."
And the results look OK to me:
a = \
b
foo = \
dasd
So I've pushed this to Emacs 28; feel free to tweak further.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 3 years and 363 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.