From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#53981: 28.0.91; shortdoc: Add support for outline-minor-mode Date: Thu, 17 Feb 2022 19:45:28 +0200 Organization: LINKOV.NET Message-ID: <86iltdlacv.fsf@mail.linkov.net> References: <87czjpso5q.fsf@gnus.org> <87sfsky494.fsf@gmail.com> <875ypgqxzg.fsf@gnus.org> <86fsoi29ho.fsf@mail.linkov.net> <87czjln2fq.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4124"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: Daniel Mendler , 53981@debbugs.gnu.org, =?UTF-8?Q?K=C3=A9vin?= Le Gouguec To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 17 19:06:30 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nKlAk-0000uW-SG for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Feb 2022 19:06:30 +0100 Original-Received: from localhost ([::1]:35206 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nKlAj-0007lW-PH for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Feb 2022 13:06:29 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:36520) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nKktq-0005Cl-RF for bug-gnu-emacs@gnu.org; Thu, 17 Feb 2022 12:49:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58748) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nKktq-0007W8-FS for bug-gnu-emacs@gnu.org; Thu, 17 Feb 2022 12:49:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nKktq-0007Ut-FN for bug-gnu-emacs@gnu.org; Thu, 17 Feb 2022 12:49:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Feb 2022 17:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53981 X-GNU-PR-Package: emacs Original-Received: via spool by 53981-submit@debbugs.gnu.org id=B53981.164512011928781 (code B ref 53981); Thu, 17 Feb 2022 17:49:02 +0000 Original-Received: (at 53981) by debbugs.gnu.org; 17 Feb 2022 17:48:39 +0000 Original-Received: from localhost ([127.0.0.1]:52644 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nKktT-0007U9-05 for submit@debbugs.gnu.org; Thu, 17 Feb 2022 12:48:39 -0500 Original-Received: from relay6-d.mail.gandi.net ([217.70.183.198]:42649) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nKktQ-0007Tb-1H for 53981@debbugs.gnu.org; Thu, 17 Feb 2022 12:48:37 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 38A48C000D; Thu, 17 Feb 2022 17:48:27 +0000 (UTC) In-Reply-To: <87czjln2fq.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 17 Feb 2022 12:43:37 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:227110 Archived-At: > 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)