changeset 60414:ce5c67075d6b

(normal-erase-is-backspace): Define default value.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sun, 06 Mar 2005 00:32:12 +0000
parents 28b5c27160e8
children fe3c6e97ccc6
files lisp/simple.el
diffstat 1 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/simple.el	Sun Mar 06 00:27:53 2005 +0000
+++ b/lisp/simple.el	Sun Mar 06 00:32:12 2005 +0000
@@ -5025,7 +5025,17 @@
 
 ;;; 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