bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#53981: 28.0.91; shortdoc: Add support for outline-minor-mode


From: Juri Linkov
Subject: bug#53981: 28.0.91; shortdoc: Add support for outline-minor-mode
Date: Thu, 17 Feb 2022 19:45:28 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

> No, I was thinking that modes like this would just put a text property
> like `outline-heading' (or even just `heading') on the heading, and then
> outline-minor-mode would use that.

Should these modes also put the text property `outline-level'?

Then maybe instead of two text properties `outline-heading'=t and
`outline-level'=N, it should be enough to put just `outline-level':

diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el
index 658edd6752..7bcf331eb9 100644
--- a/lisp/emacs-lisp/shortdoc.el
+++ b/lisp/emacs-lisp/shortdoc.el
@@ -1284,7 +1284,12 @@ shortdoc-display-group
          (unless (bobp)
            (insert "\n"))
          (insert (propertize
-                  (concat (substitute-command-keys data) "\n\n")
+                  (substitute-command-keys data)
+                  'face 'shortdoc-heading
+                  'shortdoc-section t
+                  'outline-level 1))
+         (insert (propertize
+                  "\n\n"
                   'face 'shortdoc-heading
                   'shortdoc-section t)))
         ;; There may be functions not yet defined in the data.
@@ -1307,7 +1312,7 @@ shortdoc--display-function
         (start-section (point))
         arglist-start)
     ;; Function calling convention.
-    (insert (propertize "(" 'shortdoc-function function))
+    (insert (propertize "(" 'shortdoc-function function 'outline-level 2))
     (if (plist-get data :no-manual)
         (insert-text-button
          (symbol-name function)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]