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

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

Re: Changing outline-minor-mode keybindings for texinfo files


From: Yuri Khan
Subject: Re: Changing outline-minor-mode keybindings for texinfo files
Date: Sat, 15 May 2021 16:00:14 +0700

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))

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]