summaryrefslogtreecommitdiff
path: root/lisp/progmodes/sh-script.el
diff options
context:
space:
mode:
authorNoam Postavsky <npostavs@gmail.com>2019-07-13 21:30:43 -0400
committerNoam Postavsky <npostavs@gmail.com>2019-07-13 21:38:04 -0400
commitbcc3d36d8a4b2931ffb7a45436c4b014b1420ff3 (patch)
tree1177d9ed7283f67887b42bbbc6af7defd2d52c68 /lisp/progmodes/sh-script.el
parent427ccb932164ed08a95455940c232860ffc6e417 (diff)
downloademacs-bcc3d36d8a4b2931ffb7a45436c4b014b1420ff3.tar.gz
; 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 "[.+]".
Diffstat (limited to 'lisp/progmodes/sh-script.el')
-rw-r--r--lisp/progmodes/sh-script.el1
1 files changed, 1 insertions, 0 deletions
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:]_]+\\)\\(\\[.+\\]\\)?"