all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: saneman <ddd@sdf.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Problems with 'd' and 'delete' key
Date: Sun, 20 Apr 2008 17:26:04 +0200	[thread overview]
Message-ID: <480b6047$0$90263$14726298@news.sunsite.dk> (raw)
In-Reply-To: <87ve2cwopo.fsf@hubble.informatimago.com>

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	other threads:[~2008-04-20 15:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-20 14:51 Problems with 'd' and 'delete' key saneman
2008-04-20 15:06 ` Pascal Bourguignon
2008-04-20 15:26   ` saneman [this message]
2008-04-20 17:22     ` djfiander
2008-04-21  7:25       ` saneman
2008-04-21  7:29         ` saneman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='480b6047$0$90263$14726298@news.sunsite.dk' \
    --to=ddd@sdf.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.