From: Ola Nilsson Date: Sun, 23 Jun 2019 21:00:25 +0000 (+0200) Subject: Allow underscore in defun-prompt-regex names for sh-script X-Git-Tag: emacs-27.0.90~2172 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fa3af359df8754423a197682d31245ad88c02033;p=emacs.git Allow underscore in defun-prompt-regex names for sh-script * lisp/progmodes/sh-script.el (defun-prompt-regexp): Allow underscore in function names. --- diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index aa6ada96cd4..ae90531a7fe 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -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