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

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

Re: headings for texinfo-mode using outline-minor-mode


From: pietru
Subject: Re: headings for texinfo-mode using outline-minor-mode
Date: Wed, 12 May 2021 07:11:08 +0200

Could you help me set my own, as I have some additional ones such as
@uchap, @usec, @usubsec, @usubsubsec.

(defvar gilgamesh-texinfo-hdlevels
      '( ("@chapter" . 2)
         ("@section" . 3)
         ("@subsection" . 4)
         ("@subsubsection" . 5)
         ;; --------------------------------------------------
         ("@unnumbered" . 2)
         ("@unnumberedsec" . 3)
         ("@unnumberedsubsec" . 4)
         ("@unnumberedsubsubsec" . 5)
         ;; --------------------------------------------------
         ("@appendix" . 2)
         ("@appendixsec" . 3)
         ("@appendixsubsec" . 4)
         ("@appendixsubsubsec" . 5)
         ;; --------------------------------------------------
         ("majorheading" 2)
         ;; --------------------------------------------------
         ("chapheading" 2)
         ("heading" 3)
         ("subheading" 4)
         ("subsubheading" 5)
         ;; --------------------------------------------------
         ("@uchap" . 2)
         ("@usec" . 3)
         ("@usubsec" . 4)
         ("@usubsubsec" . 5) ))

(setq-local outline-heading-alist
            ;; We should merge `outline-heading-alist' and
            ;; `texinfo-section-list'.  But in the mean time, let's
            ;; just generate one from the other.
            (mapcar (lambda (x) (cons (concat "@" (car x)) (cadr x)))
                    gilgamesh-texinfo-hdlevels))

;;(defun gilgamesh-faddeev-texinfo ()
;;   "todo"
;;   (add-hook 'texinfo-mode-hook #'gilgamesh-texinfo-hdlevels) )

I do not know whether using "add-hook" is the way to do it.

> Sent: Wednesday, May 12, 2021 at 5:26 AM
> From: "Stefan Monnier via Users list for the GNU Emacs text editor" 
> <help-gnu-emacs@gnu.org>
> To: help-gnu-emacs@gnu.org
> Subject: Re: headings for texinfo-mode using outline-minor-mode
>
> pietru@caramail.com [2021-05-11 18:43:16] wrote:
> > What do headings start with for texinfo-mode, when using outline-minor-mode?
>
> `texinfo-mode` is one of the rare modes which explicitly sets
> `outline-heading-alist`, so you have the answer in there ;-)
>
>
>         Stefan
>
>
>



reply via email to

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