* lisp/progmodes/sh-script.el (sh-smie--sh-keyword-p): Handle variable

assignments such as "case=hello".

Fixes: debbugs:17297
This commit is contained in:
Stefan Monnier 2014-04-19 13:14:27 -04:00
parent 5305137ad6
commit fe36068f12
2 changed files with 9 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2014-04-19 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/sh-script.el (sh-smie--sh-keyword-p): Handle variable
assignments such as "case=hello" (bug#17297).
2014-04-18 Michael Albinus <michael.albinus@gmx.de>
* net/tramp.el (tramp-run-real-handler, tramp-file-name-handler):

View file

@ -1832,9 +1832,10 @@ Does not preserve point."
(defun sh-smie--sh-keyword-p (tok)
"Non-nil if TOK (at which we're looking) really is a keyword."
(if (equal tok "in")
(sh-smie--sh-keyword-in-p)
(sh-smie--keyword-p)))
(cond
((looking-at "[[:alnum:]_]+=") nil)
((equal tok "in") (sh-smie--sh-keyword-in-p))
(t (sh-smie--keyword-p))))
(defun sh-smie-sh-forward-token ()
(if (and (looking-at "[ \t]*\\(?:#\\|\\(\\s|\\)\\|$\\)")