Re: Hyperlatex default emacs key bindings for Debian
Roland Stigge <stigge@antcom.de> wrote:
> On Wed, 2003-08-13 at 19:11, Peter S Galbraith wrote:
> > > -(global-set-key "\C-ch" 'hyperlatex-format-buffer)
> > > +(eval-after-load "latex"
> > > + '(add-to-list 'after-load-alist
> > > + '("latex" (define-key LaTeX-mode-map
> > > + (kbd "C-c C-c h")
> > > + 'hyperlatex-format-buffer)))
> > > + (define-key LaTeX-mode-map
> > > + (kbd "C-c C-c h")
> > > + 'hyperlatex-format-buffer))
> > > ======================================================================
> > >
> > > :)
> > >
> > > ?
> >
> > No, not really. `eval-after-load' will by itself hack the
> > after-load-list or run the code now if the file is already loaded. So
> > something like:
> >
> > (eval-after-load "latex"
> > '(define-key LaTeX-mode-map "\C-c\C-ch" 'hyperlatex-format-buffer))
>
> Thanks. Is the additional define-key still appropriate?
No. The above is all you need.
> > But use a different key again. C-c C-c is already used in AUC-TeX's
> > LaTeX-mode-map:
> >
> > C-c C-c runs the command TeX-command-master
>
> Where do I find which (suitable) keys are still "free"?
Install it, edit a LaTeX and see?
> (Suggest one and
> I'll take it. :)
>
> bye,
> Roland
The manual says:
| * Sequences consisting of `C-c' followed by `{', `}', `<', `>', `:'
| or `;' are also reserved for major modes.
|
| * Sequences consisting of `C-c' followed by any other punctuation
| character are allocated for minor modes. Using them in a major
| mode is not absolutely prohibited, but if you do that, the major
| mode binding may be shadowed from time to time by minor modes.
I gather that hyperlatex is a minor-mode?
Then you also have to be careful not to use a binding already used by
other minor modes (such as reftex, hide/show). Doesn't leave many
choices.
Peter
Reply to: