From e52125457734ea56ffa1e7f0a14fde1d3fc75d53 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 6 Mar 2005 00:32:12 +0000 Subject: [PATCH] (normal-erase-is-backspace): Define default value. --- lisp/simple.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lisp/simple.el b/lisp/simple.el index 68ef955431a..00005ae355b 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -5025,7 +5025,17 @@ the front of the list of recently selected ones." ;;; Handling of Backspace and Delete keys. -(defcustom normal-erase-is-backspace nil +(defcustom normal-erase-is-backspace + (and (not noninteractive) + (or (memq system-type '(ms-dos windows-nt)) + (and (memq window-system '(x)) + (fboundp '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 ?\^H)))) "If non-nil, Delete key deletes forward and Backspace key deletes backward. On window systems, the default value of this option is chosen -- 2.39.2