mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 12:21:25 -08:00
Allow more shell script defun forms
* lisp/progmodes/sh-script.el (sh-mode): Allow more shell
script defun forms, like function name () {...} (bug#19754).
This commit is contained in:
parent
8e7712c7af
commit
c817549b52
1 changed files with 6 additions and 1 deletions
|
|
@ -1661,7 +1661,12 @@ with your script for an edit-interpret-debug cycle."
|
|||
(setq-local skeleton-filter-function 'sh-feature)
|
||||
(setq-local skeleton-newline-indent-rigidly t)
|
||||
(setq-local defun-prompt-regexp
|
||||
(concat "^\\(function[ \t]\\|[[:alnum:]]+[ \t]+()[ \t]+\\)"))
|
||||
(concat
|
||||
"^\\("
|
||||
"\\(function[ \t]\\)?[ \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
|
||||
#'sh-completion-at-point-function nil t)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue