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: michael-franzese
Subject: Re: Changing outline-minor-mode keybindings for texinfo files
Date: Fri, 14 May 2021 15:31:59 +0200

Have wade to following adaptation which seems to work.  Still I would value
comments and points of view.

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

> Sent: Saturday, May 15, 2021 at 12:24 AM
> From: michael-franzese@gmx.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
>
> > Sent: Friday, May 14, 2021 at 10:04 PM
> > From: michael-franzese@gmx.com
> > To: "Jean Louis" <bugs@gnu.support>
> > Cc: "Help Gnu Emacs" <help-gnu-emacs@gnu.org>
> > Subject: Re: Changing outline-minor-mode keybindings for texinfo files
> >
> > > Sent: Friday, May 14, 2021 at 9:51 PM
> > > From: "Jean Louis" <bugs@gnu.support>
> > > To: michael-franzese@gmx.com
> > > Cc: "Help Gnu Emacs" <help-gnu-emacs@gnu.org>
> > > Subject: Re: Changing outline-minor-mode keybindings for texinfo files
> > >
> > > * michael-franzese@gmx.com <michael-franzese@gmx.com> [2021-05-14 10:29]:
> > > > Have coded things this way.  Then I load a texi file and press "H-q",
> > > > but I get "H-q is undefined".
> > > >
> > > > (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)
> > > >      ))
> > >
> > > You define function but I without giving result out. You copy
> > > texinfo-mode-map to map, and change the map, but after that all
> > > changes are lost in such function that yields with nothing.
> >
> > Would I need add-hook of some kind?
>
> How does one go about this thing of using different keybindings rather than
> the long version "C-c @ ..."?
>
> > > --
> > > 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]