emacs-devel
[Top][All Lists]
Advanced

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

Re: Proposal: Remap interactive commands via keymaps


From: Eli Zaretskii
Subject: Re: Proposal: Remap interactive commands via keymaps
Date: Fri, 04 Jan 2002 10:57:02 +0200

> From: address@hidden (Kim F. Storm)
> Date: 03 Jan 2002 23:56:41 +0100
> 
> Suppose that in the x-mode minor mode, I want all keys bound to
> self-insert-command to insert the typed character followed by an `x',
> i.e. to execute the following command instead:
> 
>     (defun x-self-insert-command ()
>         (interactive)
>         (insert (this-command-keys) "x"))
> 
> Rather than rebinding all the self-insert-command keys in x-mode's
> minor mode keymap, we can achieve exactly the same functionality
> with a single binding:
> 
>     (define-key x-mode-map [self-insert-command] 'x-self-insert-command)

How is this different from substitute-key-definition?  What am I
missing?



reply via email to

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