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

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

Changing outline-minor-mode keybindings for texinfo files


From: michael-franzese
Subject: Changing outline-minor-mode keybindings for texinfo files
Date: Sat, 15 May 2021 12:48:21 +0200


> Sent: Saturday, May 15, 2021 at 9:00 PM
> From: "Yuri Khan" <yuri.v.khan@gmail.com>
> To: michael-franzese@gmx.com
> Cc: "Help Gnu Emacs" <help-gnu-emacs@gnu.org>, "Jean Louis" <bugs@gnu.support>
> Subject: Re: Changing outline-minor-mode keybindings for texinfo files
>
> On Sat, 15 May 2021 at 15:40, <michael-franzese@gmx.com> wrote:
> 
> > Yes, I am experimenting.
> >
> > I have this solution,
> >
> > (defun hide-keytrigger
> >
> >       (define-key texinfo-mode-map
> >          (kbd "H-o b") #'outline-hide-body)
> >
> >       (define-key texinfo-mode-map
> >          (kbd "H-o q") #'outline-hide-sublevels) )
> >
> > (with-eval-after-load 'texinfo #'hide-keytrigger)
> >
> > This way I hope that the function hide-keytrigger would set the
> > keybindings after texinfo has loaded.
> 
> That function will set the keybindings as soon as you invoke it. And
> the syntax of ‘with-eval-after-load’ is different from that of
> ‘add-hook’. You need to pass a form to it, not a function symbol:
> 
>     (with-eval-after-load 'texinfo
>       (hide-keytrigger))

Because it is an evaluation of hide-keytrigger.  Things making sense now.
Thank you for the example code and explanation.
 
> When you do that, ‘with-eval-after-load’ will arrange your function to
> be invoked after texinfo.el loads.
> 
>



reply via email to

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