From: Noam Postavsky Date: Sun, 14 Jul 2019 01:30:43 +0000 (-0400) Subject: ; Add comment about sh-assignment-regexp value X-Git-Tag: emacs-27.0.90~1931 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bcc3d36d8a4b2931ffb7a45436c4b014b1420ff3;p=emacs.git ; Add comment about sh-assignment-regexp value * lisp/progmodes/sh-script.el (sh-assignment-regexp): Explain what the the "\\[.+\\]" is for, to make clear it is not a typo for "[.+]". --- diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index ae90531a7fe..b92449d7647 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -578,6 +578,7 @@ This is buffer-local in every such buffer.") :group 'sh-script) (defcustom sh-assignment-regexp + ;; The "\\[.+\\]" matches the "[index]" in "arrayvar[index]=value". `((csh . "\\<\\([[:alnum:]_]+\\)\\(\\[.+\\]\\)?[ \t]*[-+*/%^]?=") ;; actually spaces are only supported in let/(( ... )) (ksh88 . ,(concat "\\<\\([[:alnum:]_]+\\)\\(\\[.+\\]\\)?"