From 0d05a032b6e96c68c40760f6d87a5f28513e5d60 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Thu, 1 Nov 2001 13:10:58 +0000 Subject: [PATCH] (command-line): If the terminal Emacs is running on has erase char set to ^H, use the Backspace key for deleting backward, and the Delete key for deleting forward. --- lisp/ChangeLog | 6 ++++++ lisp/startup.el | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 75996a4cec6..3265c5227f0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2001-11-01 Gerd Moellmann + + * startup.el (command-line): If the terminal Emacs is running on + has erase char set to ^H, use the Backspace key for deleting + backward, and the Delete key for deleting forward. + 2001-10-31 Jason Rumney * international/mule-cmds.el (locale-language-names): Add chs and diff --git a/lisp/startup.el b/lisp/startup.el index 98240fa1b83..0d9687e1558 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -795,7 +795,12 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'." (when (or (memq system-type '(ms-dos windows-nt)) (and (memq window-system '(x)) (fboundp 'x-backspace-delete-keys-p) - (x-backspace-delete-keys-p))) + (x-backspace-delete-keys-p)) + ;; If the terminal Emacs is running on has erase char + ;; set to ^H, use the Backspace key for deleting + ;; backward and, and the Delete key for deleting forward. + (and (null window-system) + (eq tty-erase-char 8))) (setq-default normal-erase-is-backspace t) (normal-erase-is-backspace-mode 1))) -- 2.39.2