]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/progmodes/sh-script.el (sh--assignment-collect): Only after `=`!
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 12 Sep 2019 19:43:50 +0000 (15:43 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 12 Sep 2019 19:43:50 +0000 (15:43 -0400)
lisp/progmodes/sh-script.el

index 230789eb6cdcdbd4dfa6f200628ab5a0e71b42df..cbc0ac74f09f7276ecd3a6d6c600c2878404faa1 100644 (file)
@@ -4338,12 +4338,13 @@ option followed by a colon `:' if the option accepts an argument."
 
 (defun sh--assignment-collect ()
   (sh-remember-variable
-   (save-excursion
-     (if (re-search-forward (sh-feature sh-assignment-regexp)
-                           (prog1 (point)
-                             (beginning-of-line 1))
-                           t)
-        (match-string 1)))))
+   (when (eq ?= (char-before))
+     (save-excursion
+       (if (re-search-forward (sh-feature sh-assignment-regexp)
+                             (prog1 (point)
+                               (beginning-of-line 1))
+                             t)
+          (match-string 1))))))
 
 
 (defun sh-maybe-here-document (arg)