]> code.delx.au - gnu-emacs/commitdiff
(x-handle-geometry): Put height and width on default-frame-alist,
authorRichard M. Stallman <rms@gnu.org>
Mon, 24 Dec 2001 04:52:54 +0000 (04:52 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 24 Dec 2001 04:52:54 +0000 (04:52 +0000)
left and top on initial-frame-alist.

lisp/ChangeLog
lisp/term/w32-win.el
lisp/term/x-win.el

index 9fbd1abc8d4a4094c22f7f8c22d485c3bd702c7b..1043fa7b79827c4fc1101ece332cf9797c315c7c 100644 (file)
@@ -1,5 +1,9 @@
 2001-12-23  Richard M. Stallman  <rms@gnu.org>
 
+       * term/x-win.el (x-handle-geometry): Put height and width
+       on default-frame-alist, left and top on initial-frame-alist.
+       * term/w32-win.el (x-handle-geometry): Likewise.
+
        * sort.el (sort-reorder-buffer): Copy all to a temp buffer first.
 
        * play/yow.el (yow): Use an arg to distinguish interactive calls,
index 9cc3d2c0b82d4d09f8b55edce6e9d6a25eb8ccfa..64fa5ae47bae0f65b8b04615e913eec8279c90ed 100644 (file)
@@ -300,15 +300,24 @@ the last file dropped is selected."
 
 (defun x-handle-geometry (switch)
   "Handle the \"-geometry\" SWITCH."
-  (let ((geo (x-parse-geometry (car x-invocation-args))))
-    (setq initial-frame-alist
-         (append initial-frame-alist
-                 (if (or (assq 'left geo) (assq 'top geo))
-                     '((user-position . t)))
-                 (if (or (assq 'height geo) (assq 'width geo))
-                     '((user-size . t)))
-                 geo)
-         x-invocation-args (cdr x-invocation-args))))
+  (let* ((geo (x-parse-geometry (car x-invocation-args)))
+        (left (assq 'left geo))
+        (top (assq 'top geo))
+        (height (assq 'height geo))
+        (width (assq 'width geo)))
+    (if (or height width)
+       (setq default-frame-alist
+             (append default-frame-alist
+                     '((user-size . t))
+                     (if height (list height))
+                     (if width (list width)))))
+    (if (or left top)
+       (setq initial-frame-alist
+             (append initial-frame-alist
+                     '((user-position . t))
+                     (if left (list left))
+                     (if top (list top)))))
+    (setq x-invocation-args (cdr x-invocation-args))))
 
 (defun x-handle-name-rn-switch (switch)
   "Handle a \"-name\" or \"-rn\" SWITCH."
index a3e0d94afb3d888114a4897b133b99beffe9652a..f161f5cb202aeca8bdedea2357a07c20bc2e7987 100644 (file)
 
 ;; Handle the geometry option
 (defun x-handle-geometry (switch)
-  (let ((geo (x-parse-geometry (car x-invocation-args))))
-    (setq initial-frame-alist
-         (append initial-frame-alist
-                 (if (or (assq 'left geo) (assq 'top geo))
-                     '((user-position . t)))
-                 (if (or (assq 'height geo) (assq 'width geo))
-                     '((user-size . t)))
-                 geo)
-         x-invocation-args (cdr x-invocation-args))))
+  (let* ((geo (x-parse-geometry (car x-invocation-args)))
+        (left (assq 'left geo))
+        (top (assq 'top geo))
+        (height (assq 'height geo))
+        (width (assq 'width geo)))
+    (if (or height width)
+       (setq default-frame-alist
+             (append default-frame-alist
+                     '((user-size . t))
+                     (if height (list height))
+                     (if width (list width)))))
+    (if (or left top)
+       (setq initial-frame-alist
+             (append initial-frame-alist
+                     '((user-position . t))
+                     (if left (list left))
+                     (if top (list top)))))
+    (setq x-invocation-args (cdr x-invocation-args))))
 
 ;; Handle the -name option.  Set the variable x-resource-name
 ;; to the option's operand; set the name of