aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier2016-01-10 00:31:29 -0500
committerStefan Monnier2016-01-10 00:31:29 -0500
commitbd3f53dd2e14b886ec46667a10611c549d4f09be (patch)
treedf93fa378c49732bdb1b9176e675f7ca493aa3a9 /lisp
parent09b2b8a5ce5b542856f93b645db51eb11cf9855a (diff)
downloademacs-bd3f53dd2e14b886ec46667a10611c549d4f09be.tar.gz
emacs-bd3f53dd2e14b886ec46667a10611c549d4f09be.zip
* sh-script.el (sh-smie-sh-rules): Improve indentation inside $(...)
* lisp/progmodes/sh-script.el (sh-smie-sh-rules): Improve indentation within $(...). * test/indent/shell.sh: Add corresponding test.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/sh-script.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 02d329d794d..7f89ab2762c 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -2115,7 +2115,11 @@ May return nil if the line should not be treated as continued."
2115 ;; sh-indent-after-done: aligned completely differently. 2115 ;; sh-indent-after-done: aligned completely differently.
2116 (`(:after . "in") (sh-var-value 'sh-indent-for-case-label)) 2116 (`(:after . "in") (sh-var-value 'sh-indent-for-case-label))
2117 ;; sh-indent-for-continuation: Line continuations are handled differently. 2117 ;; sh-indent-for-continuation: Line continuations are handled differently.
2118 (`(:after . ,(or `"(" `"{" `"[")) (sh-var-value 'sh-indent-after-open)) 2118 (`(:after . ,(or `"(" `"{" `"["))
2119 (if (not (looking-at ".[ \t]*[^\n \t#]"))
2120 (sh-var-value 'sh-indent-after-open)
2121 (goto-char (1- (match-end 0)))
2122 `(column . ,(current-column))))
2119 ;; sh-indent-after-function: we don't handle it differently. 2123 ;; sh-indent-after-function: we don't handle it differently.
2120 )) 2124 ))
2121 2125