[98664] in RedHat Linux List

home help back first fref pref prev next nref lref last post

Re: backspace in text mode emacs

daemon@ATHENA.MIT.EDU (Jan Carlson)
Tue Nov 10 00:12:43 1998

Date: Tue, 10 Nov 1998 00:09:47 -0500
From: Jan Carlson <janc@iname.com>
To: redhat-list@redhat.com
CC: Greg Fall <gmf@dweezil.dyn.ml.org>
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com

This is a multi-part message in MIME format.
--------------E337355E26B4E47552DA7E7A
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Greg Fall wrote:

> I'd love to be able to use emacs-nox, but all my attempts to make the
> backspace key do the right thing have failed (^H gets help, and it seems
> especially resistant to any other definition).  Anybody know?

Append the attachment to .emacs, and enjoy.

--

Jan Carlson
janc@iname.com   Scarborough, Ontario, Canada
Mailed with Netscape 4.5 on Red Hat Linux 5.2



--------------E337355E26B4E47552DA7E7A
Content-Type: text/plain; charset=us-ascii;
 name=".emacs"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename=".emacs"

; This is $HOME/.emacs for emacs to read at startup
;
; ** Changes the Help Key from Backspace(ctl-h) to ctl-z
; ** Makes ctl-h kill the previous character
; ** Trys to make this consistent in other contexts also.

(defun kill-forward-char (arg)
  "Kill the following ARG characters (previous, with negative ARG),
saving them in the kill ring."
  (interactive "p")
  (kill-forward-chars arg))

(setq search-delete-char ?\^h)		; char deletes from incr search string
(setq search-exit-char ?\^m)		; to allow meta-commands after a search
(setq help-char ?\^z)                   ; ctl-z is help key
(global-set-key "\^z" 'help-command)
(global-set-key "\^z\^z" 'help-for-help)
(global-set-key "\^z\^a" 'apropos)
(global-set-key "\^h" 'kill-backward-char)	;puts character on kill ring

--------------E337355E26B4E47552DA7E7A--


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
		http://www.redhat.com http://archive.redhat.com
         To unsubscribe: mail redhat-list-request@redhat.com with 
                       "unsubscribe" as the Subject.


home help back first fref pref prev next nref lref last post