Mercurial > emacs
comparison lisp/term/x-win.el @ 779:c2dbf1fe0506
*** empty log message ***
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Wed, 15 Jul 1992 03:24:58 +0000 |
parents | 540b047ece4d |
children | 336ffe2bd537 |
comparison
equal
deleted
inserted
replaced
778:cd00bdacc17b | 779:c2dbf1fe0506 |
---|---|
59 ;; ../startup.el. | 59 ;; ../startup.el. |
60 | 60 |
61 (if (not (eq window-system 'x)) | 61 (if (not (eq window-system 'x)) |
62 (error "Loading x-win.el but not compiled for X")) | 62 (error "Loading x-win.el but not compiled for X")) |
63 | 63 |
64 (require 'screen) | 64 (require 'frame) |
65 (require 'mouse) | 65 (require 'mouse) |
66 | 66 |
67 (setq command-switch-alist | 67 (setq command-switch-alist |
68 (append '(("-bw" . x-handle-numeric-switch) | 68 (append '(("-bw" . x-handle-numeric-switch) |
69 ("-d" . x-handle-display) | 69 ("-d" . x-handle-display) |
116 ;; Handler for switches of the form "-switch value" or "-switch". | 116 ;; Handler for switches of the form "-switch value" or "-switch". |
117 (defun x-handle-switch (switch) | 117 (defun x-handle-switch (switch) |
118 (let ((aelt (assoc switch x-switch-definitions))) | 118 (let ((aelt (assoc switch x-switch-definitions))) |
119 (if aelt | 119 (if aelt |
120 (if (nth 2 aelt) | 120 (if (nth 2 aelt) |
121 (setq default-screen-alist | 121 (setq default-frame-alist |
122 (cons (cons (nth 1 aelt) (nth 2 aelt)) | 122 (cons (cons (nth 1 aelt) (nth 2 aelt)) |
123 default-screen-alist)) | 123 default-frame-alist)) |
124 (setq default-screen-alist | 124 (setq default-frame-alist |
125 (cons (cons (nth 1 aelt) | 125 (cons (cons (nth 1 aelt) |
126 (car x-invocation-args)) | 126 (car x-invocation-args)) |
127 default-screen-alist) | 127 default-frame-alist) |
128 x-invocation-args (cdr x-invocation-args)))))) | 128 x-invocation-args (cdr x-invocation-args)))))) |
129 | 129 |
130 ;; Handler for switches of the form "-switch n" | 130 ;; Handler for switches of the form "-switch n" |
131 (defun x-handle-numeric-switch (switch) | 131 (defun x-handle-numeric-switch (switch) |
132 (let ((aelt (assoc switch x-switch-definitions))) | 132 (let ((aelt (assoc switch x-switch-definitions))) |
133 (if aelt | 133 (if aelt |
134 (setq default-screen-alist | 134 (setq default-frame-alist |
135 (cons (cons (nth 1 aelt) | 135 (cons (cons (nth 1 aelt) |
136 (string-to-int (car x-invocation-args))) | 136 (string-to-int (car x-invocation-args))) |
137 default-screen-alist) | 137 default-frame-alist) |
138 x-invocation-args | 138 x-invocation-args |
139 (cdr x-invocation-args))))) | 139 (cdr x-invocation-args))))) |
140 | 140 |
141 ;; Handle the geometry option | 141 ;; Handle the geometry option |
142 (defun x-handle-geometry (switch) | 142 (defun x-handle-geometry (switch) |
143 (setq initial-screen-alist (append initial-screen-alist | 143 (setq initial-frame-alist (append initial-frame-alist |
144 (x-geometry (car x-invocation-args))) | 144 (x-geometry (car x-invocation-args))) |
145 x-invocation-args (cdr x-invocation-args))) | 145 x-invocation-args (cdr x-invocation-args))) |
146 | 146 |
147 (defvar x-display-name nil | 147 (defvar x-display-name nil |
148 "The X display name specifying server and X screen.") | 148 "The X display name specifying server and X frame.") |
149 | 149 |
150 (defun x-handle-display (switch) | 150 (defun x-handle-display (switch) |
151 (setq x-display-name (car x-invocation-args) | 151 (setq x-display-name (car x-invocation-args) |
152 x-invocation-args (cdr x-invocation-args))) | 152 x-invocation-args (cdr x-invocation-args))) |
153 | 153 |
440 ;;; xterm.c depends on using interrupt-driven input, but we don't want | 440 ;;; xterm.c depends on using interrupt-driven input, but we don't want |
441 ;;; the fcntls to apply to the terminal, so we do this after opening | 441 ;;; the fcntls to apply to the terminal, so we do this after opening |
442 ;;; the display. | 442 ;;; the display. |
443 (set-input-mode t nil t) | 443 (set-input-mode t nil t) |
444 | 444 |
445 (setq screen-creation-function 'x-create-screen) | 445 (setq frame-creation-function 'x-create-frame) |
446 (setq suspend-hook | 446 (setq suspend-hook |
447 '(lambda () | 447 '(lambda () |
448 (error "Suspending an emacs running under X makes no sense"))) | 448 (error "Suspending an emacs running under X makes no sense"))) |
449 | 449 |
450 ;;; We keep track of the last text selected here, so we can check the | 450 ;;; We keep track of the last text selected here, so we can check the |