Emacs mode: fix indentation in blocks which are given options
E.g. indentation was incorrect following “model(block);”. [skip ci]silicon
parent
fcdd810eb4
commit
8200c356a7
|
@ -299,7 +299,7 @@ License: GPL-2+ with Autoconf exception
|
||||||
|
|
||||||
Files: scripts/dynare.el
|
Files: scripts/dynare.el
|
||||||
Copyright: 2010 Yannick Kalantzis
|
Copyright: 2010 Yannick Kalantzis
|
||||||
2019-2021 Dynare Team
|
2019-2023 Dynare Team
|
||||||
License: GPL-3+
|
License: GPL-3+
|
||||||
|
|
||||||
Files: mex/sources/gensylv/gensylv.cc
|
Files: mex/sources/gensylv/gensylv.cc
|
||||||
|
|
|
@ -216,7 +216,7 @@
|
||||||
(setq cur-indent (current-indentation)))
|
(setq cur-indent (current-indentation)))
|
||||||
((looking-at (concat "^[ \t]*" (eval-when-compile (regexp-opt
|
((looking-at (concat "^[ \t]*" (eval-when-compile (regexp-opt
|
||||||
dynare-blocks))
|
dynare-blocks))
|
||||||
"[ \t]*;"))
|
"\\([ \t]*(.*)\\)?[ \t]*;")) ; NB: match block options if any
|
||||||
;; A block opening keyword was found: we need to indent an extra level
|
;; A block opening keyword was found: we need to indent an extra level
|
||||||
(setq cur-indent (+ (current-indentation) dynare-block-offset))) ; Do the actual indenting
|
(setq cur-indent (+ (current-indentation) dynare-block-offset))) ; Do the actual indenting
|
||||||
((bobp)
|
((bobp)
|
||||||
|
|
Loading…
Reference in New Issue