From: Stefan Monnier Date: Thu, 12 Sep 2019 19:43:50 +0000 (-0400) Subject: * lisp/progmodes/sh-script.el (sh--assignment-collect): Only after `=`! X-Git-Tag: emacs-27.0.90~1551^2~88 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=421084d2cb160261b259bddb687bb2c234f8f1ef;p=emacs.git * lisp/progmodes/sh-script.el (sh--assignment-collect): Only after `=`! --- diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 230789eb6cd..cbc0ac74f09 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -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)