Mercurial > emacs
comparison 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 |
comparison
equal
deleted
inserted
replaced
83386:db4e74787e6f | 83387:0181341f0aca |
---|---|
674 frame) | 674 frame) |
675 (unless frame-creation-function | 675 (unless frame-creation-function |
676 (error "Don't know how to create a frame on window system %s" w)) | 676 (error "Don't know how to create a frame on window system %s" w)) |
677 (run-hooks 'before-make-frame-hook) | 677 (run-hooks 'before-make-frame-hook) |
678 (setq frame (funcall frame-creation-function (append parameters (cdr (assq w window-system-default-frame-alist))))) | 678 (setq frame (funcall frame-creation-function (append parameters (cdr (assq w window-system-default-frame-alist))))) |
679 (normal-erase-is-backspace-setup-frame frame) | |
679 (run-hook-with-args 'after-make-frame-functions frame) | 680 (run-hook-with-args 'after-make-frame-functions frame) |
680 frame)) | 681 frame)) |
681 | 682 |
682 (defun filtered-frame-list (predicate) | 683 (defun filtered-frame-list (predicate) |
683 "Return a list of all live frames which satisfy PREDICATE." | 684 "Return a list of all live frames which satisfy PREDICATE." |
1448 | 1449 |
1449 TERMINAL can be a terminal id, a frame, or nil (meaning the | 1450 TERMINAL can be a terminal id, a frame, or nil (meaning the |
1450 selected frame's terminal)." | 1451 selected frame's terminal)." |
1451 (cdr (assq (terminal-id terminal) terminal-parameter-alist))) | 1452 (cdr (assq (terminal-id terminal) terminal-parameter-alist))) |
1452 | 1453 |
1454 (defun terminal-parameter-p (terminal parameter) | |
1455 "Return non-nil if PARAMETER is a terminal parameter on TERMINAL. | |
1456 | |
1457 The actual value returned in that case is a cell (PARAMETER . VALUE), | |
1458 where VALUE is the current value of PARAMETER. | |
1459 | |
1460 TERMINAL can be a terminal id, a frame, or nil (meaning the | |
1461 selected frame's terminal)." | |
1462 (assq parameter (cdr (assq (terminal-id terminal) terminal-parameter-alist)))) | |
1463 | |
1453 (defun terminal-parameter (terminal parameter) | 1464 (defun terminal-parameter (terminal parameter) |
1454 "Return TERMINAL's value for parameter PARAMETER. | 1465 "Return TERMINAL's value for parameter PARAMETER. |
1455 | 1466 |
1456 TERMINAL can be a terminal id, a frame, or nil (meaning the | 1467 TERMINAL can be a terminal id, a frame, or nil (meaning the |
1457 selected frame's terminal)." | 1468 selected frame's terminal)." |
1458 (cdr (assq parameter (cdr (assq (terminal-id terminal) terminal-parameter-alist))))) | 1469 (cdr (terminal-parameter-p terminal parameter))) |
1459 | 1470 |
1460 (defun set-terminal-parameter (terminal parameter value) | 1471 (defun set-terminal-parameter (terminal parameter value) |
1461 "Set TERMINAL's value for parameter PARAMETER to VALUE. | 1472 "Set TERMINAL's value for parameter PARAMETER to VALUE. |
1462 Returns the previous value of PARAMETER. | 1473 Returns the previous value of PARAMETER. |
1463 | 1474 |