Daniel Mendler writes: > The shortdoc buffer currently lacks support for the outline-minor-mode. > By setting the two variables outline-regexp and outline-level, we can > unlock this feature. Does it make sense to provide this by default? > > (defun shortdoc--outline-level () (if (eq (char-after) ?\() 2 1))) > (add-hook 'shortdoc-mode-hook > (lambda () > (setq-local outline-level #'shortdoc--outline-level > outline-regexp "[A-Z(]"))) I tried the following: diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el index 658edd6752..fd79cf5116 100644 --- a/lisp/emacs-lisp/shortdoc.el +++ b/lisp/emacs-lisp/shortdoc.el @@ -1435,7 +1435,10 @@ shortdoc-mode-map (define-derived-mode shortdoc-mode special-mode "shortdoc" "Mode for shortdoc." - :interactive nil) + :interactive nil + (setq-local outline-level (lambda () + (if (eq (char-after) ?\() 2 1)) + outline-regexp "[A-Z(]")) (defun shortdoc--goto-section (arg sym &optional reverse) (unless (natnump arg) But then hiding levels made the display pretty weird: