diff options
author | Richard M. Stallman <rms@gnu.org> | 2001-12-24 04:52:54 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2001-12-24 04:52:54 +0000 |
commit | ea8d3061370eb3c02cc659eb0b013a358de853b2 (patch) | |
tree | b974a005e0787dda0878a4855c162df020eeb24c /lisp/term | |
parent | 67f5954cbd0608a8380a78b4df694d168ce257b4 (diff) | |
download | emacs-ea8d3061370eb3c02cc659eb0b013a358de853b2.tar.gz |
(x-handle-geometry): Put height and width on default-frame-alist,
left and top on initial-frame-alist.
Diffstat (limited to 'lisp/term')
-rw-r--r-- | lisp/term/w32-win.el | 27 | ||||
-rw-r--r-- | lisp/term/x-win.el | 27 |
2 files changed, 36 insertions, 18 deletions
diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el index 9cc3d2c0b82..64fa5ae47ba 100644 --- a/lisp/term/w32-win.el +++ b/lisp/term/w32-win.el @@ -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." diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index a3e0d94afb3..f161f5cb202 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el @@ -127,15 +127,24 @@ ;; 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 |