aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/term
diff options
context:
space:
mode:
authorRichard M. Stallman1993-07-27 08:38:00 +0000
committerRichard M. Stallman1993-07-27 08:38:00 +0000
commitef599142ed418ab7e0ea574087445708b57506e4 (patch)
tree3937b59b94398323bdb6c823bee13da5acc48dd2 /lisp/term
parent3f2f8c83abf7122dd6b9b3d5546f2892a7d8815d (diff)
downloademacs-ef599142ed418ab7e0ea574087445708b57506e4.tar.gz
emacs-ef599142ed418ab7e0ea574087445708b57506e4.zip
(x-handle-iconic): New function.
(command-switch-alist): Use that. (x-switch-definitions): Delete elt for `-iconic'. (x-selection-timeout): Use 20000 as default. (x-select-text): Never set the CLIPBOARD selection. (x-cut-buffer-or-selection-value): Try PRIMARY before cut buffer. (x-cut-buffer-max): Set based on x-server-max-request-size.
Diffstat (limited to 'lisp/term')
-rw-r--r--lisp/term/x-win.el19
1 files changed, 13 insertions, 6 deletions
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index 8b3b49cd87f..be6c026fa40 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -100,7 +100,7 @@
100 ("-ms" . x-handle-switch) 100 ("-ms" . x-handle-switch)
101 ("-itype" . x-handle-switch) 101 ("-itype" . x-handle-switch)
102 ("-i" . x-handle-switch) 102 ("-i" . x-handle-switch)
103 ("-iconic" . x-handle-switch) 103 ("-iconic" . x-handle-iconic)
104 ("-xrm" . x-handle-xrm-switch) 104 ("-xrm" . x-handle-xrm-switch)
105 ("-cr" . x-handle-switch) 105 ("-cr" . x-handle-switch)
106 ("-vb" . x-handle-switch) 106 ("-vb" . x-handle-switch)
@@ -125,7 +125,6 @@
125 ("-cr" cursor-color) 125 ("-cr" cursor-color)
126 ("-itype" icon-type t) 126 ("-itype" icon-type t)
127 ("-i" icon-type t) 127 ("-i" icon-type t)
128 ("-iconic" visibility icon)
129 ("-vb" vertical-scroll-bars t) 128 ("-vb" vertical-scroll-bars t)
130 ("-hb" horizontal-scroll-bars t) 129 ("-hb" horizontal-scroll-bars t)
131 ("-bd" border-color) 130 ("-bd" border-color)
@@ -145,6 +144,11 @@
145 default-frame-alist) 144 default-frame-alist)
146 x-invocation-args (cdr x-invocation-args)))))) 145 x-invocation-args (cdr x-invocation-args))))))
147 146
147;; Make -iconic apply only to the initial frame!
148(defun x-handle-iconic (switch)
149 (setq initial-frame-alist
150 (cons '(visibility . icon) initial-frame-alist)))
151
148;; Handler for switches of the form "-switch n" 152;; Handler for switches of the form "-switch n"
149(defun x-handle-numeric-switch (switch) 153(defun x-handle-numeric-switch (switch)
150 (let ((aelt (assoc switch x-switch-definitions))) 154 (let ((aelt (assoc switch x-switch-definitions)))
@@ -492,8 +496,8 @@ This returns ARGS with the arguments that have been processed removed."
492(defvar x-last-selected-text nil) 496(defvar x-last-selected-text nil)
493 497
494;;; It is said that overlarge strings are slow to put into the cut buffer. 498;;; It is said that overlarge strings are slow to put into the cut buffer.
495(defvar x-cut-buffer-max (min (- (/ (x-server-max-request-size) 2) 100) 499;;; Note this value is overridden below.
496 20000) 500(defvar x-cut-buffer-max 20000
497 "Max number of characters to put in the cut buffer.") 501 "Max number of characters to put in the cut buffer.")
498 502
499;;; Make TEXT, a string, the primary X selection. 503;;; Make TEXT, a string, the primary X selection.
@@ -518,9 +522,9 @@ This returns ARGS with the arguments that have been processed removed."
518 522
519 ;; Consult the selection, then the cut buffer. Treat empty strings 523 ;; Consult the selection, then the cut buffer. Treat empty strings
520 ;; as if they were unset. 524 ;; as if they were unset.
521 (or text (setq text (x-get-selection 'PRIMARY))) 525 (setq text (x-get-selection 'PRIMARY))
522 (if (string= text "") (setq text nil)) 526 (if (string= text "") (setq text nil))
523 (setq text (x-get-cut-buffer 0)) 527 (or text (setq text (x-get-cut-buffer 0)))
524 (if (string= text "") (setq text nil)) 528 (if (string= text "") (setq text nil))
525 529
526 (cond 530 (cond
@@ -555,6 +559,9 @@ This returns ARGS with the arguments that have been processed removed."
555 559
556(setq frame-creation-function 'x-create-frame-with-faces) 560(setq frame-creation-function 'x-create-frame-with-faces)
557 561
562(setq x-cut-buffer-max (min (- (/ (x-server-max-request-size) 2) 100)
563 x-cut-buffer-max))
564
558;; Apply a geometry resource to the initial frame. Put it at the end 565;; Apply a geometry resource to the initial frame. Put it at the end
559;; of the alist, so that anything specified on the command line takes 566;; of the alist, so that anything specified on the command line takes
560;; precedence. 567;; precedence.