emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Generalizing make-composed-keymap (was: [Emacs-diffs] emacs-25 d7084f2:


From: Stefan Monnier
Subject: Generalizing make-composed-keymap (was: [Emacs-diffs] emacs-25 d7084f2: Fix todo-mode use of minibuffer completion keymap (bug#23695).)
Date: Wed, 15 Jun 2016 11:23:33 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

BTW, currently make-composed-keymap takes a list of maps as argument,
but I'm beginning to think it would make sense to also accept (KEY
. CMD) elements in that list, so that we can just say

    (make-composed-keymap
     '((" " my-space-replacement)
       ("?" nil))                ; Just hide the old ? binding.
     my-parent-map)

instead of

    (let ((map (make-sparse-keymap)))
      (set-keymap-parent map my-parent-map)
      (define-key map " " 'my-space-replacement)
      (define-key map "?" nil)
      map)

WDYT?


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]