]> git.eshelyaron.com Git - emacs.git/commitdiff
Allow underscore in defun-prompt-regex names for sh-script
authorOla Nilsson <ola.nilsson@gmail.com>
Sun, 23 Jun 2019 21:00:25 +0000 (23:00 +0200)
committerNoam Postavsky <npostavs@gmail.com>
Fri, 28 Jun 2019 00:02:54 +0000 (20:02 -0400)
* lisp/progmodes/sh-script.el (defun-prompt-regexp):
Allow underscore in function names.

lisp/progmodes/sh-script.el

index aa6ada96cd4a308cefdbb7e96de3087155f524ad..ae90531a7fefafc40b1556562d13dae00191d0ce 100644 (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