diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2022-09-19 21:15:06 +0200 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2022-09-19 21:15:06 +0200 |
commit | c6d3d97bf5a75e0c4a653f3cc380371f890f4fb3 (patch) | |
tree | c080e249caaeccf026aaca5726f6c62c3bfb1e56 /lisp/outline.el | |
parent | 0e5eb6ec8ce99c423bbafc6e8e3292d4459050d1 (diff) | |
parent | d6b25b84bc8cde6b8d396b073945c8340e6ca40d (diff) | |
download | emacs-c6d3d97bf5a75e0c4a653f3cc380371f890f4fb3.tar.gz emacs-c6d3d97bf5a75e0c4a653f3cc380371f890f4fb3.tar.bz2 emacs-c6d3d97bf5a75e0c4a653f3cc380371f890f4fb3.zip |
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Diffstat (limited to 'lisp/outline.el')
-rw-r--r-- | lisp/outline.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/outline.el b/lisp/outline.el index 25ef1616b93..e3fbd8b3272 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -341,6 +341,10 @@ data reflects the `outline-regexp'.") :safe #'booleanp :version "22.1") +(defvar outline-imenu-generic-expression + (list (list nil (concat "^\\(?:" outline-regexp "\\).*$") 0)) + "Value for `imenu-generic-expression' in Outline mode.") + ;;;###autoload (define-derived-mode outline-mode text-mode "Outline" "Set major mode for editing outlines with selective display. @@ -375,8 +379,7 @@ Turning on outline mode calls the value of `text-mode-hook' and then of (concat paragraph-separate "\\|\\(?:" outline-regexp "\\)")) (setq-local font-lock-defaults '(outline-font-lock-keywords t nil nil backward-paragraph)) - (setq-local imenu-generic-expression - (list (list nil (concat "^\\(?:" outline-regexp "\\).*$") 0))) + (setq-local imenu-generic-expression outline-imenu-generic-expression) (add-hook 'change-major-mode-hook #'outline-show-all nil t) (add-hook 'hack-local-variables-hook #'outline-apply-default-state nil t)) |