[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-24 r117261: * lisp/progmodes/sh-script.el (sh-smie-s
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] emacs-24 r117261: * lisp/progmodes/sh-script.el (sh-smie-sh-rules): Use same rule for && as |
Date: |
Thu, 19 Jun 2014 22:52:19 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117261
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17621
committer: Stefan Monnier <address@hidden>
branch nick: emacs-24
timestamp: Thu 2014-06-19 18:52:12 -0400
message:
* lisp/progmodes/sh-script.el (sh-smie-sh-rules): Use same rule for && as
for |.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/progmodes/sh-script.el shscript.el-20091113204419-o5vbwnq5f7feedwu-727
test/indent/shell.sh shell.sh-20110209185043-iuyrh0is1gz0s4w6-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-06-18 22:02:15 +0000
+++ b/lisp/ChangeLog 2014-06-19 22:52:12 +0000
@@ -1,3 +1,8 @@
+2014-06-19 Stefan Monnier <address@hidden>
+
+ * progmodes/sh-script.el (sh-smie-sh-rules): Use same rule for && as
+ for | (bug#17621).
+
2014-06-18 Stefan Monnier <address@hidden>
* xt-mouse.el (xterm-mouse-translate-1): Fix last change (bug#17776).
=== modified file 'lisp/progmodes/sh-script.el'
--- a/lisp/progmodes/sh-script.el 2014-05-01 23:55:25 +0000
+++ b/lisp/progmodes/sh-script.el 2014-06-19 22:52:12 +0000
@@ -1970,7 +1970,7 @@
(smie-rule-bolp))))
(current-column)
(smie-indent-calculate)))))
- (`(:after . "|") (if (smie-rule-parent-p "|") nil 4))
+ (`(:after . ,(or `"|" `"&&" `"||")) (if (smie-rule-parent-p token) nil 4))
;; Attempt at backward compatibility with the old config variables.
(`(:before . "fi") (sh-var-value 'sh-indent-for-fi))
(`(:before . "done") (sh-var-value 'sh-indent-for-done))
=== modified file 'test/indent/shell.sh'
--- a/test/indent/shell.sh 2013-10-29 14:46:23 +0000
+++ b/test/indent/shell.sh 2014-06-19 22:52:12 +0000
@@ -23,6 +23,12 @@
;;
esac
+{ # bug#17621
+ foo1 &&
+ foo2 &&
+ bar
+}
+
echo -n $(( 5 << 2 ))
# This should not be treated as a heredoc (bug#12770).
2
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-24 r117261: * lisp/progmodes/sh-script.el (sh-smie-sh-rules): Use same rule for && as,
Stefan Monnier <=