aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/term
diff options
context:
space:
mode:
authorKaroly Lorentey2004-01-11 21:59:40 +0000
committerKaroly Lorentey2004-01-11 21:59:40 +0000
commit2246281fb0e2ab610d14efa7166a9ceb02597643 (patch)
tree09416af10eec00f4d43af0dd569cc90cda408ce6 /lisp/term
parentc0707982ab8a080139a45b35fc7906415ba2f1bc (diff)
downloademacs-2246281fb0e2ab610d14efa7166a9ceb02597643.tar.gz
emacs-2246281fb0e2ab610d14efa7166a9ceb02597643.zip
Support for opening X frames from a tty session.
lisp/cus-face.el (custom-declare-face): Handle multiple concurrent display methods correctly. lisp/faces.el (x-create-frame-with-faces): Set the window-system frame parameter instead of frame-creation-function. (tty-create-frame-with-faces): Ditto. lisp/frame.el (frame-creation-function): Removed. (frame-creation-function-alist): New variable. (frame-initialize): Use initial-window-system instead of window-system. Add window-system parameter to initial-frame-alist. Removed tty initialization, it was moved to frame-creation-function-alist. (frame-notice-user-settings): Use initial-window-system instead of window-system. (make-frame-on-display): Make sure term/x-win is loaded. Added window-system parameter for make-frame. (make-frame-on-tty): Removed unnecessary autoload declaration. Added window-system parameter for make-frame. (make-frame): Use frame-creation-function-alist to determine the function to use depending on the specified window system. (select-frame-by-name): Use the window-system function instead of the variable. lisp/startup.el (window-system): New variable (previously built-in, now frame-local). (normal-top-level, command-line): Use initial-window-system instead of window-system. lisp/loadup.el: Load startup.el before faces.el, for the window-system variable. lisp/term/x-win.el: Check for the x-create-frame function instead of window-system to see if X is available. Don't exit Emacs if the display can not be opened when X is not the initial display method. Set up frame-creation-function-alist instead of frame-creation-function. Provide the x-win feature. src/dispnew.c (Vwindow_system): Renamed to Vinitial_window_system. (init_display, syms_of_display): Updated to use Vinitial_window_system instead of Vwindow_system. src/emacs.c (shut_down_emacs): Updated to use Vinitial_window_system instead of Vwindow_system. src/keyboard.c (Fset_input_mode): Call reset_all_sys_modes, not reset_sys_modes. Ditto for init_all_sys_modes. Process the quit parameter correctly. src/sysdep.c (init_sys_modes, reset_sys_modes): Unconditionally set up the terminal. We don't get called if there is nothing to do anymore. (sys_select): Use Vinitial_window_system, not Vwindow_system. src/window.h (Vwindow_system): Renamed to Vinitial_window_system. src/xfns.c (Fx_create_frame): Don't check_x. We initialize it anyway. (x_display_info_for_name, Fx_open_connection): Don't look at Vinitial_window_system. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-54
Diffstat (limited to 'lisp/term')
-rw-r--r--lisp/term/x-win.el13
1 files changed, 9 insertions, 4 deletions
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index 2388b7e29bd..11e3c073b76 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -66,7 +66,7 @@
66;; An alist of X options and the function which handles them. See 66;; An alist of X options and the function which handles them. See
67;; ../startup.el. 67;; ../startup.el.
68 68
69(if (not (eq window-system 'x)) 69(if (not (fboundp 'x-create-frame))
70 (error "%s: Loading x-win.el but not compiled for X" (invocation-name))) 70 (error "%s: Loading x-win.el but not compiled for X" (invocation-name)))
71 71
72(require 'frame) 72(require 'frame)
@@ -1159,6 +1159,7 @@ XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp")
1159 1159
1160;;;; Function keys 1160;;;; Function keys
1161 1161
1162;;; XXX This might be wrong with multi-tty support.
1162(substitute-key-definition 'suspend-emacs 'iconify-or-deiconify-frame 1163(substitute-key-definition 'suspend-emacs 'iconify-or-deiconify-frame
1163 global-map) 1164 global-map)
1164 1165
@@ -2346,10 +2347,11 @@ order until succeed.")
2346(x-open-connection (or x-display-name 2347(x-open-connection (or x-display-name
2347 (setq x-display-name (getenv "DISPLAY"))) 2348 (setq x-display-name (getenv "DISPLAY")))
2348 x-command-line-resources 2349 x-command-line-resources
2349 ;; Exit Emacs with fatal error if this fails. 2350 ;; Exit Emacs with fatal error if this fails and we
2350 t) 2351 ;; are the initial display.
2352 (eq initial-window-system 'x))
2351 2353
2352(setq frame-creation-function 'x-create-frame-with-faces) 2354(add-to-list 'frame-creation-function-alist '(x . x-create-frame-with-faces))
2353 2355
2354(setq x-cut-buffer-max (min (- (/ (x-server-max-request-size) 2) 100) 2356(setq x-cut-buffer-max (min (- (/ (x-server-max-request-size) 2) 100)
2355 x-cut-buffer-max)) 2357 x-cut-buffer-max))
@@ -2431,6 +2433,7 @@ order until succeed.")
2431 (if res-selection-timeout 2433 (if res-selection-timeout
2432 (setq x-selection-timeout (string-to-number res-selection-timeout)))) 2434 (setq x-selection-timeout (string-to-number res-selection-timeout))))
2433 2435
2436;; XXX This is wrong with multi-tty support.
2434(defun x-win-suspend-error () 2437(defun x-win-suspend-error ()
2435 (error "Suspending an Emacs running under X makes no sense")) 2438 (error "Suspending an Emacs running under X makes no sense"))
2436(add-hook 'suspend-hook 'x-win-suspend-error) 2439(add-hook 'suspend-hook 'x-win-suspend-error)
@@ -2453,5 +2456,7 @@ order until succeed.")
2453;; Turn on support for mouse wheels. 2456;; Turn on support for mouse wheels.
2454(mouse-wheel-mode 1) 2457(mouse-wheel-mode 1)
2455 2458
2459(provide 'x-win)
2460
2456;;; arch-tag: f1501302-db8b-4d95-88e3-116697d89f78 2461;;; arch-tag: f1501302-db8b-4d95-88e3-116697d89f78
2457;;; x-win.el ends here 2462;;; x-win.el ends here