all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: New define-key syntax with custom keymap
@ 2021-11-23  6:51 Manuel Uberti
  0 siblings, 0 replies; 10+ messages in thread
From: Manuel Uberti @ 2021-11-23  6:51 UTC (permalink / raw)
  To: larsi, emacs-devel

Sorry if I haven't replied before on this, but on a recent version of Emacs 
master (I built 2955d46c00 this morning) I switched to the new keymap-* commands 
and everything is working as expected.

-- 
Manuel Uberti
www.manueluberti.eu



^ permalink raw reply	[flat|nested] 10+ messages in thread
* New define-key syntax with custom keymap
@ 2021-10-19  5:53 Manuel Uberti
  2021-10-19 13:52 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 10+ messages in thread
From: Manuel Uberti @ 2021-10-19  5:53 UTC (permalink / raw)
  To: emacs-devel

Hi,

following the recent changes on master, I am trying to use the new syntax to 
define key bindings. The following works as expected:

(global-set-key ["C-M-z"] #'mu-indent-defun)

But these do not work:

(define-key mu-keys-mode-map ["C-<return>"] #'mu-open-line-below)
(define-key mu-keys-mode-map ["C-c C-n"] #'mu-cleanup-buffer)

Whereas these work as expected:

(define-key mu-keys-mode-map (kbd "C-<return>") #'mu-open-line-below)
(define-key mu-keys-mode-map "\C-c\C-n" #'mu-cleanup-buffer)

For reference, mu-keys-mode-map comes from this code in my init.el:

(defvar mu-keys-mode-map (make-keymap)
   "Keymap for command `mu-keys-mode'.")

(define-minor-mode mu-keys-mode
   "Minor mode for my personal key bindings."
   :init-value t
   :global t
   :keymap mu-keys-mode-map
   :group 'local)

(push `((mu-keys-mode . ,mu-keys-mode-map)) emulation-mode-map-alists)

I am probably missing something, but I don't know what.

-- 
Manuel Uberti
www.manueluberti.eu



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-11-23  6:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-23  6:51 New define-key syntax with custom keymap Manuel Uberti
  -- strict thread matches above, loose matches on Subject: below --
2021-10-19  5:53 Manuel Uberti
2021-10-19 13:52 ` Lars Ingebrigtsen
2021-10-19 13:54   ` Manuel Uberti
2021-10-19 13:59   ` Manuel Uberti
2021-10-19 14:14     ` Lars Ingebrigtsen
2021-10-19 14:19       ` Manuel Uberti
2021-10-19 14:22         ` Lars Ingebrigtsen
2021-10-19 14:27           ` Manuel Uberti
2021-10-19 14:32             ` Lars Ingebrigtsen

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.