GNU bug report logs -
#36317
[PATCH] Correct the name part of defun-prompt-regex in sh-script-mode
Previous Next
Reported by: Ola Nilsson <ola.nilsson <at> gmail.com>
Date: Thu, 20 Jun 2019 23:18:01 UTC
Severity: normal
Tags: fixed, patch
Fixed in version 27.1
Done: Noam Postavsky <npostavs <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
* lisp/progmodes/sh-script.el (defun-prompt-regexp):
Allow underscore in function names.
---
lisp/progmodes/sh-script.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 853a3500ee..8a0ab20d70 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -1619,9 +1619,9 @@ sh-mode
(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
--
2.11.0
This bug report was last modified 5 years and 329 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.