aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2014-04-19 13:14:27 -0400
committerStefan Monnier2014-04-19 13:14:27 -0400
commitfe36068f12b959de7c368b7e50cded27e76c0245 (patch)
treed0e338f50971d668355f78406b1606c84f9a36b6
parent5305137ad626f32c7792dc558eebecd99dfa1f33 (diff)
downloademacs-fe36068f12b959de7c368b7e50cded27e76c0245.tar.gz
emacs-fe36068f12b959de7c368b7e50cded27e76c0245.zip
* lisp/progmodes/sh-script.el (sh-smie--sh-keyword-p): Handle variable
assignments such as "case=hello". Fixes: debbugs:17297
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/progmodes/sh-script.el7
2 files changed, 9 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 729c0b2a40c..d762078dfd0 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12014-04-19 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * progmodes/sh-script.el (sh-smie--sh-keyword-p): Handle variable
4 assignments such as "case=hello" (bug#17297).
5
12014-04-18 Michael Albinus <michael.albinus@gmx.de> 62014-04-18 Michael Albinus <michael.albinus@gmx.de>
2 7
3 * net/tramp.el (tramp-run-real-handler, tramp-file-name-handler): 8 * net/tramp.el (tramp-run-real-handler, tramp-file-name-handler):
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 8ab6a0466d4..06d7a8fdffe 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -1832,9 +1832,10 @@ Does not preserve point."
1832 1832
1833(defun sh-smie--sh-keyword-p (tok) 1833(defun sh-smie--sh-keyword-p (tok)
1834 "Non-nil if TOK (at which we're looking) really is a keyword." 1834 "Non-nil if TOK (at which we're looking) really is a keyword."
1835 (if (equal tok "in") 1835 (cond
1836 (sh-smie--sh-keyword-in-p) 1836 ((looking-at "[[:alnum:]_]+=") nil)
1837 (sh-smie--keyword-p))) 1837 ((equal tok "in") (sh-smie--sh-keyword-in-p))
1838 (t (sh-smie--keyword-p))))
1838 1839
1839(defun sh-smie-sh-forward-token () 1840(defun sh-smie-sh-forward-token ()
1840 (if (and (looking-at "[ \t]*\\(?:#\\|\\(\\s|\\)\\|$\\)") 1841 (if (and (looking-at "[ \t]*\\(?:#\\|\\(\\s|\\)\\|$\\)")