From: Stefan Monnier Date: Sun, 6 Mar 2005 00:32:12 +0000 (+0000) Subject: (normal-erase-is-backspace): Define default value. X-Git-Tag: ttn-vms-21-2-B4~1975 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e52125457734ea56ffa1e7f0a14fde1d3fc75d53;p=emacs.git (normal-erase-is-backspace): Define default value. --- 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