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

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

Re: Setting up user defined texinfo headlines using outline-heading-alis


From: Jean Louis
Subject: Re: Setting up user defined texinfo headlines using outline-heading-alist
Date: Thu, 13 May 2021 18:34:26 +0300
User-agent: Mutt/2.0.6 (2021-03-06)

* Yuri Khan <yuri.v.khan@gmail.com> [2021-05-13 16:27]:
> On Thu, 13 May 2021 at 19:46, Christopher Dimech <dimech@gmx.com> wrote:
> 
> […]
> 
> Ha! Much better.
> 
> > Have modified my init file with the following code that resets 
> > "outline-heading-alist"
> > to include @usec, @usebsec as headings in addition to @unnumbered
> >
> > (defvar texinfo-hdlevels […])
> >
> > (setq-local outline-heading-alist texinfo-hdlevels)
> 
> If that’s all that you have in your init file, then the setq-local
> acts on the wrong buffer. It sets the local value of the variable
> ‘outline-heading-alist’ in whichever buffer that is current at the
> time your init file is executed, maybe *scratch* or something. But you
> actually want it to act on the buffer that visits your test.texi file.
> 
> To that end, put that setq-local in a hook that runs when you visit a
> .texi file:
> 
> (defun my-texinfo-outline ()
>   (setq-local outline-heading-alist texinfo-hdlevels))

I don't think there is any need for `setq-local' as
`outline-heading-alist' becomes automatically buffer local variable.

Just using `setq' is enough, in the right buffer.


-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

Sign an open letter in support of Richard M. Stallman
https://stallmansupport.org/
https://rms-support-letter.github.io/




reply via email to

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