help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Problems with 'd' and 'delete' key


From: saneman
Subject: Re: Problems with 'd' and 'delete' key
Date: Sun, 20 Apr 2008 17:26:04 +0200
User-agent: Thunderbird 2.0.0.12 (X11/20080227)

Pascal Bourguignon wrote:
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").



I have now tried:

(global-set-key (kbd "C-d") 'comment-dwim)

instead but that also changes the delete key. Could it be a bug in emacs? I am using a danish keyboard.


reply via email to

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