Article View: gnu.emacs.help
Article #189384Re: using C-h to erase
From: Dan_Jacobson
Date: Mon, 25 Feb 1991 19:38
Date: Mon, 25 Feb 1991 19:38
56 lines
3179 bytes
3179 bytes
>>>>> On 25 Feb 91 18:13:56 GMT, sinyaw@starbright.smsc.sony.com (Sin-Yaw Wang) said: Sin-Yaw> I remember a thread of discussion on this group some weeks Sin-Yaw> ago on someone trying to use C-h (backspace) to erase, Sin-Yaw> instead of <DEL>. Can whoever found out about this give me Sin-Yaw> some help? Subject: Problems with the Backspace / Delete keys in GNU Emacs From: Chip Webb (Charles_A_Webb@ATT.COM) Date: 11 Nov 89 [and 11/1990 below] On some terminals, the backspace and the delete keys are placed inappropriately for GNU emacs. Some terminals have DEL in a hard to to get location and have made BS easy to hit. Other terminals put the two keys so close together so that they are easily mis-typed. The problem with BS and DEL when using GNU emacs is that BS (also known as Control-H) invokes the online help system. It is a bit inappropriate, if not surprising, to get the help menu when all you were trying to do was fix a typo. Originally, it was intended that the commands in emacs be mnemonically sensible, i.e. C-f for forward character C-b for backward character and C-h for help. The usual solution to the problem is to re-bind C-h to invoke the function delete-backward-character and find another key to invoke help. Putting the following two lines in your ~/.emacs file will do this. Help is then invoked with C-x h instead of C-h. (C-x h is normally bound to the command mark-whole-buffer; these commands undo that binding) Of course you can put help-command anywhere you want, this is just an example. ;;; Remap the backspace key to delete-backward-char and ;;; put help in a sensible place. (define-key global-map "\C-h" 'delete-backward-char) (define-key global-map "\C-xh" 'help-command) ----------------- From: Dan_Jacobson@ATT.COM Date: Nov. 1990 Another method, swapping C-h and DEL at the lowest levels (so low that 99% of GNU Emacs never knows you are actually now hitting the key labeled "DEL" for C-h and C-h for DEL) is to simply (load "term/bobcat") in your .emacs file. [This file can be found in .../lisp/term/bobcat.el in the GNU Emacs file tree.] Now, if you are also remapping the keyboard with respect to C-s and C-q, the above approach will overwrite your C-s/C-q modifications ... [so write a function that does both remappings] -- Dan_Jacobson@ATT.COM Naperville IL USA +1 708-979-6364
Technical Details
Message-ID:
<DANJ1.91Feb25133813@cbnewse.ATT.COM>Path:
arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewse!danj1References:
<SINYAW.91Feb25101356@starbright.smsc.sony.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103b8b,96fc422d6ec89af6 X-Google-Attributes: gid103b8b,public X-Google-ArrivalTime: 1991-02-25 13:41:13 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewse!danj1 From: Dan_Jacobson@ATT.COM Newsgroups: gnu.emacs.help Subject: Re: using C-h to erase Message-ID: <DANJ1.91Feb25133813@cbnewse.ATT.COM> Date: 25 Feb 91 19:38:24 GMT References: <SINYAW.91Feb25101356@starbright.smsc.sony.com> Sender: danj1@cbnewse.att.com (Dan Jacobson) Reply-To: Dan_Jacobson@ATT.COM Distribution: gnu Organization: AT&T-BL, Naperville IL, USA Lines: 56 In-Reply-To: sinyaw@starbright.smsc.sony.com's message of 25 Feb 91 18:13:56 GMT