From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: saneman Newsgroups: gmane.emacs.help Subject: Re: Problems with 'd' and 'delete' key Date: Sun, 20 Apr 2008 17:26:04 +0200 Organization: SunSITE.dk - Supporting Open source Message-ID: <480b6047$0$90263$14726298@news.sunsite.dk> References: <480b5838$0$90267$14726298@news.sunsite.dk> <87ve2cwopo.fsf@hubble.informatimago.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1208706219 23762 80.91.229.12 (20 Apr 2008 15:43:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 20 Apr 2008 15:43:39 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Apr 20 17:44:14 2008 connect(): Connection refused Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Jnbi9-0006J1-Fj for geh-help-gnu-emacs@m.gmane.org; Sun, 20 Apr 2008 17:44:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JnbgB-0006hY-Bm for geh-help-gnu-emacs@m.gmane.org; Sun, 20 Apr 2008 11:42:11 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!goblin1!goblin2!goblin.stu.neva.ru!news.net.uni-c.dk!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail User-Agent: Thunderbird 2.0.0.12 (X11/20080227) Original-Newsgroups: gnu.emacs.help In-Reply-To: <87ve2cwopo.fsf@hubble.informatimago.com> Original-Lines: 32 Original-NNTP-Posting-Host: 130.225.245.182 Original-X-Trace: news.sunsite.dk DXC=Gode`oQI; Fdj?5fOS\LBAnYSB=nbEKnkkBeW^X3\7Qfc?aXA8:Q5; kbS9o\hBcjVooMSgY1MOWN]kWRJl7Q2_\KlB=IQ8kUA54o Original-X-Complaints-To: staff@sunsite.dk Original-Xref: shelby.stanford.edu gnu.emacs.help:158062 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:53427 Archived-At: Pascal Bourguignon wrote: > saneman 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.