Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
d8899d09
Commit
d8899d09
authored
Jul 08, 2014
by
Stefan Monnier
Browse files
* lisp/progmodes/sh-script.el (sh-smie-sh-rules): Don't align with a && in
the middle of a line. Fixes: debbugs:17896
parent
c8387084
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
3 deletions
+15
-3
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/progmodes/sh-script.el
lisp/progmodes/sh-script.el
+4
-3
test/indent/shell.sh
test/indent/shell.sh
+6
-0
No files found.
lisp/ChangeLog
View file @
d8899d09
2014-07-08 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/sh-script.el (sh-smie-sh-rules): Don't align with a && in
the middle of a line (bug#17896).
2014-07-08 Juri Linkov <juri@jurta.org>
* startup.el (command-line): Append displaying the warning about
...
...
lisp/progmodes/sh-script.el
View file @
d8899d09
...
...
@@ -1989,9 +1989,10 @@ May return nil if the line should not be treated as continued."
(
<=
indent
initial
)))))
`
(
column
.
,
(
+
initial
sh-indentation
)))
(
`
(
:before
.
,
(
or
`
"("
`
"{"
`
"["
))
(
when
(
smie-rule-hanging-p
)
(
if
(
not
(
smie-rule-prev-p
"&&"
"||"
"|"
))
(
smie-rule-parent
)
(
if
(
not
(
smie-rule-prev-p
"&&"
"||"
"|"
))
(
when
(
smie-rule-hanging-p
)
(
smie-rule-parent
))
(
unless
(
smie-rule-bolp
)
(
smie-backward-sexp
'halfexp
)
`
(
column
.
,
(
smie-indent-virtual
)))))
;; FIXME: Maybe this handling of ;; should be made into
...
...
test/indent/shell.sh
View file @
d8899d09
...
...
@@ -41,6 +41,12 @@ for foo in bar; do # bug#17721
}
done
for
foo
in
bar
;
do
# bug#17896
[
-e
$foo
]
&&
[
-e
$bar
]
&&
{
echo
just fine thanks
}
done
filter_3
()
# bug#17842
{
tr
-d
'"`'
|
tr
' '
' '
|
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment