[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: |
Fri, 14 May 2021 23:00:14 +0700 |
On Fri, 14 May 2021 at 21:06, Jean Louis <bugs@gnu.support> wrote:
> > (defun vmove-keytrigger ()
> > "Visualises outline and moves texinfo code."
> >
> > (let ( (map texinfo-mode-map) )
> > (define-key map (kbd "H-q") #'outline-hide-sublevels)
> > (define-key map (kbd "H-b") #'outline-hide-body)
> > (define-key map (kbd "H-<up>") #'outline-move-subtree-up)
> > (define-key map (kbd "H-<down>") #'outline-move-subtree-down) ))
> >
> > (add-hook 'texinfo-mode-hook 'vmove-keytrigger)
>
> In my opinion that hook, when it runs, internally get that all
> defined, but once function finishes, nothing yields out of it, because
> it is within `let' enclosure and because you are working on a
> temporary variable `map'.
No, because ‘map’ is a reference to the same object that
‘texinfo-mode-map’ refers to. Within the functions, they are two names
of the same data structure. Changes made through one name within the
function are then visible through the other name after the function
returns.
- Changing outline-minor-mode keybindings for texinfo files, michael-franzese, 2021/05/14
- Re: Changing outline-minor-mode keybindings for texinfo files, michael-franzese, 2021/05/14
- Re: Changing outline-minor-mode keybindings for texinfo files, Jean Louis, 2021/05/14
- Re: Changing outline-minor-mode keybindings for texinfo files, michael-franzese, 2021/05/14
- Re: Changing outline-minor-mode keybindings for texinfo files, michael-franzese, 2021/05/14
- Re: Changing outline-minor-mode keybindings for texinfo files, michael-franzese, 2021/05/14
- Re: Changing outline-minor-mode keybindings for texinfo files, Jean Louis, 2021/05/14
- Re: Changing outline-minor-mode keybindings for texinfo files,
Yuri Khan <=
- Changing outline-minor-mode keybindings for texinfo files, michael-franzese, 2021/05/14
- Re: Changing outline-minor-mode keybindings for texinfo files, Jean Louis, 2021/05/15
- Re: Changing outline-minor-mode keybindings for texinfo files, tomas, 2021/05/15
- Re: Changing outline-minor-mode keybindings for texinfo files, Yuri Khan, 2021/05/14
- Changing outline-minor-mode keybindings for texinfo files, michael-franzese, 2021/05/14
- Re: Changing outline-minor-mode keybindings for texinfo files, Yuri Khan, 2021/05/14
- Re: Changing outline-minor-mode keybindings for texinfo files, michael-franzese, 2021/05/15
- Re: Changing outline-minor-mode keybindings for texinfo files, Yuri Khan, 2021/05/15
- Changing outline-minor-mode keybindings for texinfo files, michael-franzese, 2021/05/15
- Re: Changing outline-minor-mode keybindings for texinfo files, Yuri Khan, 2021/05/15