Add support for outlining in shell-script-mode

* lisp/progmodes/sh-script.el (sh-mode): Set outline-regexp (bug#49346).
This commit is contained in:
Lars Ingebrigtsen 2021-08-10 17:52:26 +02:00
parent 877df4eb1c
commit a6bd049031
2 changed files with 5 additions and 0 deletions

View file

@ -2398,6 +2398,10 @@ This command, called interactively, toggles the local value of
** Miscellaneous
---
*** 'shell-script-mode' now supports 'outline-minor-mode'.
The outline headings have lines that start with "##".
+++
*** New command 'revert-buffer-quick'.
This is bound to 'C-x x g' and is like `revert-buffer', but prompts

View file

@ -1532,6 +1532,7 @@ with your script for an edit-interpret-debug cycle."
(setq-local add-log-current-defun-function #'sh-current-defun-name)
(add-hook 'completion-at-point-functions
#'sh-completion-at-point-function nil t)
(setq-local outline-regexp "##")
;; Parse or insert magic number for exec, and set all variables depending
;; on the shell thus determined.
(sh-set-shell