]> git.eshelyaron.com Git - emacs.git/commitdiff
Add support for outlining in shell-script-mode
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 10 Aug 2021 15:52:26 +0000 (17:52 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 10 Aug 2021 15:52:26 +0000 (17:52 +0200)
* lisp/progmodes/sh-script.el (sh-mode): Set outline-regexp (bug#49346).

etc/NEWS
lisp/progmodes/sh-script.el

index 3c41a9779254355b14665cbe3acbcc122ad78356..b63d10fd978848814cffcdf4669033070571f97f 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -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
index 2f98b9c53c1ead4529b914e74a3d306bd107962d..8fcb311ff1fe487af182aed1f1855a5c779b86fc 100644 (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