From bcc3d36d8a4b2931ffb7a45436c4b014b1420ff3 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sat, 13 Jul 2019 21:30:43 -0400 Subject: [PATCH] ; 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 "[.+]". --- lisp/progmodes/sh-script.el | 1 + 1 file changed, 1 insertion(+) 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:]_]+\\)\\(\\[.+\\]\\)?" -- 2.39.2