[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: define-key upon common-lisp-mode and inferior-lisp-mode
From: |
Eli Zaretskii |
Subject: |
Re: define-key upon common-lisp-mode and inferior-lisp-mode |
Date: |
Tue, 30 Aug 2022 15:51:07 +0300 |
> Date: Tue, 30 Aug 2022 12:26:42 +0000
> From: uzibalqa <uzibalqa@proton.me>
> Cc: help-gnu-emacs@gnu.org
>
> > > Thusly (define-key common-lisp-mode-map KEY DEF) fails
> >
> >
> > Its doc string says:
> >
> > In addition to any hooks its parent mode ‘lisp-data-mode’ might have
> > run, this mode runs the hook ‘lisp-mode-hook’, as the final or
> > penultimate step during initialization.
> >
> > So this mode inherits the keymap from its parent, lisp-data-mode.
> >
> > As for binding keys, it is better to use local-define-key, I think.
> > It will figure out the keymap for you.
>
> Like below?
>
> (local-define-key common-lisp-mode-map (kbd "H-e") #'eval-last-sexp)
Yes.
> A bit non-standard compared to other modes.
AFAIU, you are a user, not a programmer who defines a new mode. the
above is the standard way for users to define key bindings for the
current mode.
- define-key upon common-lisp-mode and inferior-lisp-mode, wilnerthomas, 2022/08/30
- Re: define-key upon common-lisp-mode and inferior-lisp-mode, Eli Zaretskii, 2022/08/30
- Re: define-key upon common-lisp-mode and inferior-lisp-mode, uzibalqa, 2022/08/30
- Re: define-key upon common-lisp-mode and inferior-lisp-mode,
Eli Zaretskii <=
- Re: define-key upon common-lisp-mode and inferior-lisp-mode, uzibalqa, 2022/08/30
- Re: define-key upon common-lisp-mode and inferior-lisp-mode, Eli Zaretskii, 2022/08/30
- Re: define-key upon common-lisp-mode and inferior-lisp-mode, uzibalqa, 2022/08/30
- Re: define-key upon common-lisp-mode and inferior-lisp-mode, tomas, 2022/08/30
- Re: define-key upon common-lisp-mode and inferior-lisp-mode, wilnerthomas, 2022/08/30
- Re: define-key upon common-lisp-mode and inferior-lisp-mode, tomas, 2022/08/30
- Re: define-key upon common-lisp-mode and inferior-lisp-mode, wilnerthomas, 2022/08/30
- Re: define-key upon common-lisp-mode and inferior-lisp-mode, Alessandro Bertulli, 2022/08/31
- Re: define-key upon common-lisp-mode and inferior-lisp-mode, Eli Zaretskii, 2022/08/30
- Re: define-key upon common-lisp-mode and inferior-lisp-mode, Alessandro Bertulli, 2022/08/31