Mercurial > emacs
diff lisp/frame.el @ 83387:0181341f0aca
Fix Delete key on X by adapting normal-erase-is-backspace-mode for multi-tty. (Reported by Dan Waber and Dan Nicolaescu.)
* lisp/frame.el (terminal-parameter-p): New function.
(terminal-parameter): Use it.
* lisp/simple.el (normal-erase-is-backspace): Add 'maybe option, set it as default.
(normal-erase-is-backspace-mode): Rewrite for multiple display support.
(normal-erase-is-backspace-setup-frame): New function.
* lisp/frame.el (make-frame): Call it.
* lisp/startup.el (command-line): Call it.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-427
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Sun, 23 Oct 2005 22:11:22 +0000 |
parents | 0036e612aaef |
children | 732c5740ca8f |
line wrap: on
line diff
--- a/lisp/frame.el Wed Oct 19 14:06:17 2005 +0000 +++ b/lisp/frame.el Sun Oct 23 22:11:22 2005 +0000 @@ -676,6 +676,7 @@ (error "Don't know how to create a frame on window system %s" w)) (run-hooks 'before-make-frame-hook) (setq frame (funcall frame-creation-function (append parameters (cdr (assq w window-system-default-frame-alist))))) + (normal-erase-is-backspace-setup-frame frame) (run-hook-with-args 'after-make-frame-functions frame) frame)) @@ -1450,12 +1451,22 @@ selected frame's terminal)." (cdr (assq (terminal-id terminal) terminal-parameter-alist))) +(defun terminal-parameter-p (terminal parameter) + "Return non-nil if PARAMETER is a terminal parameter on TERMINAL. + +The actual value returned in that case is a cell (PARAMETER . VALUE), +where VALUE is the current value of PARAMETER. + +TERMINAL can be a terminal id, a frame, or nil (meaning the +selected frame's terminal)." + (assq parameter (cdr (assq (terminal-id terminal) terminal-parameter-alist)))) + (defun terminal-parameter (terminal parameter) "Return TERMINAL's value for parameter PARAMETER. TERMINAL can be a terminal id, a frame, or nil (meaning the selected frame's terminal)." - (cdr (assq parameter (cdr (assq (terminal-id terminal) terminal-parameter-alist))))) + (cdr (terminal-parameter-p terminal parameter))) (defun set-terminal-parameter (terminal parameter value) "Set TERMINAL's value for parameter PARAMETER to VALUE.