[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problems with 'd' and 'delete' key
From: |
Pascal Bourguignon |
Subject: |
Re: Problems with 'd' and 'delete' key |
Date: |
Sun, 20 Apr 2008 17:06:11 +0200 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/22.1 (gnu/linux) |
saneman <ddd@sdf.com> writes:
> I have redefined C-d to comment/uncomment. But when I press delete it
> also inserts a comment (% i latex mode). Is it possible to assign
> something to the key 'd' without change 'delete'?
>
> I have this in my .emacs file:
>
>
> (global-set-key "\C-d" 'comment-dwim)
> (define-key function-key-map [delete] [deletechar])
> But delete still inserts a comment instead of deleting a character.
That's strange. The doc of define-key doesn't mention vectors for
the def argument.
I would just write:
(global-set-key (kbd "C-d") 'comment-dwim)
This shouldn't change the binding of the delete key.
Note that (string= "\C-d" "C-d").
--
__Pascal Bourguignon__ http://www.informatimago.com/
COMPONENT EQUIVALENCY NOTICE: The subatomic particles (electrons,
protons, etc.) comprising this product are exactly the same in every
measurable respect as those used in the products of other
manufacturers, and no claim to the contrary may legitimately be
expressed or implied.