From: Eli Zaretskii Date: Fri, 13 Apr 2001 11:13:23 +0000 (+0000) Subject: (pc-selection-mode): Don't turn on X-Git-Tag: emacs-pretest-21.0.103~222 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5d5e7f532805a0ed4642336f85326e3044b41a94;p=emacs.git (pc-selection-mode): Don't turn on normal-erase-is-backspace on a tty. Instead, bind some keys such as [delete] directly, like pc-select.el did before normal-erase-is-backspace was invented. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 33f613fda68..5b635d48f95 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2001-04-13 Eli Zaretskii + + * emulation/pc-select.el (pc-selection-mode): Don't turn on + normal-erase-is-backspace on a tty. Instead, bind some keys such + as [delete] directly, like pc-select.el did before + normal-erase-is-backspace was invented. + 2001-04-11 Eli Zaretskii * ls-lisp.el (ls-lisp-format): Leave a blank before "root". diff --git a/lisp/emulation/pc-select.el b/lisp/emulation/pc-select.el index 46299eefeaa..fde3672f3a8 100644 --- a/lisp/emulation/pc-select.el +++ b/lisp/emulation/pc-select.el @@ -728,9 +728,22 @@ but before calling pc-selection-mode): (or pc-select-selection-keys-only (progn ;; We are behaving like normal-erase-is-backspace-mode, so - ;; say so explicitly. - (setq-default normal-erase-is-backspace t) - (normal-erase-is-backspace-mode 1) + ;; say so explicitly. But don't do that on a Unix tty, since + ;; some of them have keyboards that by default already behave + ;; as if normal-erase-is-backspace mode is on, and turning it + ;; a second time screws them up. + (if (or (eq window-system 'x) + (memq system-name '(ms-dos windows-nt))) + (progn + (setq-default normal-erase-is-backspace t) + (normal-erase-is-backspace-mode 1)) + ;; This is for tty. We don't turn on normal-erase-is-backspace, + ;; but bind keys as pc-selection-mode did before + ;; normal-erase-is-backspace was invented, to keep us back + ;; compatible. + (global-set-key [delete] 'delete-char) ; KDelete Del + (define-key function-key-map [M-delete] [?\M-d]) + (global-set-key [C-backspace] 'backward-kill-word)) (define-key global-map [S-insert] 'yank) (define-key global-map [C-insert] 'copy-region-as-kill) (define-key global-map [S-delete] 'kill-region)