diff lisp/simple.el @ 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 469a1901dd91
children be3ac492036f
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