From 7360b8aa67f12efacd2bbe29fa73387f9fcef584 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Thu, 1 Nov 2001 13:09:32 +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, 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 733e31bf774..b9aea14ba1d 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-11-01 Miles Bader * button.el (define-button-type): Make sure every user-defined diff --git a/lisp/startup.el b/lisp/startup.el index 857732fea48..c40170d6a5c 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -800,7 +800,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.5