all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: define-key upon common-lisp-mode and inferior-lisp-mode
Date: Tue, 30 Aug 2022 15:51:07 +0300	[thread overview]
Message-ID: <835yi9vqro.fsf@gnu.org> (raw)
In-Reply-To: <7W8YIKpAyrHUHX3SntrisHnwBBj7wgmuFM_7SxKRuyyo1SeYNsqCgL4QAqmVoJ2n0YivGF1mUvpcaZi6mCDhD_6-O7Yzwj1WSBgriV2FQHI=@proton.me> (message from uzibalqa on Tue, 30 Aug 2022 12:26:42 +0000)

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



  reply	other threads:[~2022-08-30 12:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-30  4:59 define-key upon common-lisp-mode and inferior-lisp-mode wilnerthomas--- via Users list for the GNU Emacs text editor
2022-08-30 11:44 ` Eli Zaretskii
2022-08-30 12:26   ` uzibalqa
2022-08-30 12:51     ` Eli Zaretskii [this message]
2022-08-30 13:22       ` uzibalqa
2022-08-30 13:49         ` Eli Zaretskii
2022-08-30 14:15           ` uzibalqa
2022-08-30 15:25             ` tomas
2022-08-30 18:21               ` wilnerthomas--- via Users list for the GNU Emacs text editor
2022-08-30 18:41                 ` tomas
2022-08-30 19:08                   ` wilnerthomas--- via Users list for the GNU Emacs text editor
2022-08-31 12:11                     ` Alessandro Bertulli
2022-08-30 16:24             ` Eli Zaretskii
2022-08-31 12:04           ` Alessandro Bertulli
2022-08-31 12:42             ` Eli Zaretskii
2022-09-01  9:27               ` Alessandro Bertulli
2022-08-30 13:24 ` Stefan Monnier via Users list for the GNU Emacs text editor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=835yi9vqro.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.