From ab1b491f8373742a051aaf554c4604f2b976b414 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Tue, 18 Oct 2022 21:13:29 +0300 Subject: * lisp/outline.el (outline-minor-mode-insert-buttons): New defvar-local. (outline--make-button-overlay, outline--insert-open-button) (outline--insert-close-button): Insert button when outline-minor-mode-insert-buttons is non-nil, otherwise put an overlay with before-string. (bug#57813) * lisp/help.el (describe-bindings): Set buffer-local outline-minor-mode-insert-buttons to t. * lisp/textmodes/emacs-news-mode.el (emacs-news--mode-common): Set buffer-local outline-minor-mode-use-margins to t. Don't set outline-regexp for leading spaces because now spaces are not added in the NEWS buffer. --- lisp/textmodes/emacs-news-mode.el | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'lisp/textmodes/emacs-news-mode.el') diff --git a/lisp/textmodes/emacs-news-mode.el b/lisp/textmodes/emacs-news-mode.el index d9decae4df6..d57d053a7ad 100644 --- a/lisp/textmodes/emacs-news-mode.el +++ b/lisp/textmodes/emacs-news-mode.el @@ -73,12 +73,9 @@ (defun emacs-news--mode-common () (setq-local font-lock-defaults '(emacs-news-mode-font-lock-keywords t)) - ;; This `outline-regexp' matches leading spaces inserted - ;; by the current implementation of `outline-minor-mode-use-buttons'. - (setq-local outline-regexp "\\(?: +\\)?\\(\\*+\\) " - outline-level (lambda () (length (match-string 1))) - outline-minor-mode-cycle t - outline-minor-mode-highlight 'append) + (setq-local outline-minor-mode-cycle t + outline-minor-mode-highlight 'append + outline-minor-mode-use-margins t) (outline-minor-mode) (setq-local imenu-generic-expression outline-imenu-generic-expression) (emacs-etc--hide-local-variables)) -- cgit v1.2.3