]> git.eshelyaron.com Git - emacs.git/commitdiff
; Add comment about sh-assignment-regexp value
authorNoam Postavsky <npostavs@gmail.com>
Sun, 14 Jul 2019 01:30:43 +0000 (21:30 -0400)
committerNoam Postavsky <npostavs@gmail.com>
Sun, 14 Jul 2019 01:38:04 +0000 (21:38 -0400)
* 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

index ae90531a7fefafc40b1556562d13dae00191d0ce..b92449d764708be3526574cff879e4886540b5b2 100644 (file)
@@ -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:]_]+\\)\\(\\[.+\\]\\)?"