From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Paul Edwards" Newsgroups: gmane.emacs.help Subject: Re: simple editor required Date: Mon, 16 Jun 2003 10:31:19 GMT Organization: BigPond Internet Services (http://www.bigpond.net.au) Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <8465nduadj.fsf@lucy.is.informatik.uni-duisburg.de> <5lfzmgbrio.fsf@rum.cs.yale.edu> <84el1zcze6.fsf@lucy.is.informatik.uni-duisburg.de> <841xxzto54.fsf@lucy.is.informatik.uni-duisburg.de> NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1055759845 24931 80.91.224.249 (16 Jun 2003 10:37:25 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 16 Jun 2003 10:37:25 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Mon Jun 16 12:37:21 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19RrKs-0006NJ-00 for ; Mon, 16 Jun 2003 12:35:38 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19RrLQ-0004VN-3j for gnu-help-gnu-emacs@m.gmane.org; Mon, 16 Jun 2003 06:36:12 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!enews.sgi.com!news.xtra.co.nz!newsfeed01.tsnz.net!ken-transit.news.telstra.net!news.telstra.net!news-server.bigpond.net.au!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 63 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Original-NNTP-Posting-Host: 144.132.167.28 Original-X-Complaints-To: abuse@bigpond.net.au Original-X-Trace: news-server.bigpond.net.au 1055759479 144.132.167.28 (Mon, 16 Jun 2003 20:31:19 EST) Original-NNTP-Posting-Date: Mon, 16 Jun 2003 20:31:19 EST Original-Xref: shelby.stanford.edu gnu.emacs.help:114472 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:10964 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:10964 "Kai Großjohann" wrote in message news:841xxzto54.fsf@lucy.is.informatik.uni-duisburg.de... > >> > (global-set-key (kbd "DEL") 'delete-char) > >> > (global-set-key (kbd "DEL") (kbd "C-d")) > >> > >> What does it mean to not work? Does Emacs crash? > > > > No, it just has no effect. The DEL key remains bound to > > delete-backward-char and keeps trying to delete the previous > > character. > > Gah? How can this be? I mean, C-h l tells that the key in question > is the DEL key. Hm. > > Is the statement really executed? Try putting (message "Hi there") > (sit-for 3) before and after the statement to see if Emacs ever gets > there. Yes it does. > Also try M-: to eval the statement from a running Emacs, to > see if that has any effect. just says "delete-char" doesn't do anything > Hm. Oh! It could be that the key is not bound in the global map, > but instead in some local map, instead. Try C-x b foo RET, which > creates a buffer named foo in fundamental mode. Maybe the DEL key > works in that mode? created buffer, but no effect. from another post... >>>>(add-hook 'c-common-mode-hook >>>> (lambda () (local-set-key "\C-?" 'delete-char))) had no effect when editting .c file. > I think that emacs-lisp-mode or lisp-interaction-mode have their own > bindings for DEL, so you'd have to do like > > (define-key emacs-lisp-mode-map (kbd "DEL") 'delete-char) AND THE WINNER IS!!! :-) Thanks a lot for figuring that out Kai. And since I now use text mode for everything, all I need is... (define-key text-mode-map (kbd "DEL") 'delete-char) and it works! For technical curiosity though, why was everyone convinced the global-set-key would work? And indeed it did work on Xemacs. I would have thought this situation would have come up all the time for the presumably large number of people who want that behaviour of DEL doing a delete-char. I'll now go back and check the relatively minor problems I have within text mode. BFN. Paul.