[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master a6bd049: Add support for outlining in shell-script-mode
From: |
Lars Ingebrigtsen |
Subject: |
master a6bd049: Add support for outlining in shell-script-mode |
Date: |
Tue, 10 Aug 2021 11:52:34 -0400 (EDT) |
branch: master
commit a6bd0490317371dd49d847a774c8ae73315fe6d1
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Add support for outlining in shell-script-mode
* lisp/progmodes/sh-script.el (sh-mode): Set outline-regexp (bug#49346).
---
etc/NEWS | 4 ++++
lisp/progmodes/sh-script.el | 1 +
2 files changed, 5 insertions(+)
diff --git a/etc/NEWS b/etc/NEWS
index 3c41a97..b63d10f 100644
--- 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
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 2f98b9c..8fcb311 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master a6bd049: Add support for outlining in shell-script-mode,
Lars Ingebrigtsen <=