1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-27 07:37:33 +00:00

Allow underscore in defun-prompt-regex names for sh-script

* lisp/progmodes/sh-script.el (defun-prompt-regexp):
Allow underscore in function names.
This commit is contained in:
Ola Nilsson 2019-06-23 23:00:25 +02:00 committed by Noam Postavsky
parent bdbb390ffe
commit fa3af359df

View File

@ -1625,9 +1625,9 @@ with your script for an edit-interpret-debug cycle."
(setq-local defun-prompt-regexp
(concat
"^\\("
"\\(function[ \t]\\)?[ \t]*[[:alnum:]]+[ \t]*([ \t]*)"
"\\(function[ \t]\\)?[ \t]*[[:alnum:]_]+[ \t]*([ \t]*)"
"\\|"
"function[ \t]+[[:alnum:]]+[ \t]*\\(([ \t]*)\\)?"
"function[ \t]+[[:alnum:]_]+[ \t]*\\(([ \t]*)\\)?"
"\\)[ \t]*"))
(setq-local add-log-current-defun-function #'sh-current-defun-name)
(add-hook 'completion-at-point-functions