diff options
| author | Karoly Lorentey | 2005-09-07 23:11:21 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2005-09-07 23:11:21 +0000 |
| commit | 0e1bfc78fbb453f514d5936cb1b35a9289b90e91 (patch) | |
| tree | c6ed18f1c994cd012f6dc8878001024bcdc92936 | |
| parent | cd85984a2dc0c2cfa169834b11712845cbb93364 (diff) | |
| download | emacs-0e1bfc78fbb453f514d5936cb1b35a9289b90e91.tar.gz emacs-0e1bfc78fbb453f514d5936cb1b35a9289b90e91.zip | |
Apply settings in `window-system-default-frame-alist' to the initial frame as well.
* lisp/frame.el (frame-notice-user-settings): Extend to apply
settings in `window-system-default-frame-alist' as well.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-400
| -rw-r--r-- | lisp/frame.el | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lisp/frame.el b/lisp/frame.el index 59a1490e399..68dd7ddaf90 100644 --- a/lisp/frame.el +++ b/lisp/frame.el | |||
| @@ -251,7 +251,9 @@ Pass it BUFFER as first arg, and (cdr ARGS) gives the rest of the args." | |||
| 251 | ;; information to which we must react; do what needs to be done. | 251 | ;; information to which we must react; do what needs to be done. |
| 252 | (defun frame-notice-user-settings () | 252 | (defun frame-notice-user-settings () |
| 253 | "Act on user's init file settings of frame parameters. | 253 | "Act on user's init file settings of frame parameters. |
| 254 | React to settings of `default-frame-alist', `initial-frame-alist' there." | 254 | React to settings of `initial-frame-alist', |
| 255 | `window-system-default-frame-alist' and `default-frame-alist' | ||
| 256 | there (in decreasing order of priority)." | ||
| 255 | ;; Make menu-bar-mode and default-frame-alist consistent. | 257 | ;; Make menu-bar-mode and default-frame-alist consistent. |
| 256 | (when (boundp 'menu-bar-mode) | 258 | (when (boundp 'menu-bar-mode) |
| 257 | (let ((default (assq 'menu-bar-lines default-frame-alist))) | 259 | (let ((default (assq 'menu-bar-lines default-frame-alist))) |
| @@ -279,7 +281,9 @@ React to settings of `default-frame-alist', `initial-frame-alist' there." | |||
| 279 | ;; want to use save-excursion here, because that may also try to set | 281 | ;; want to use save-excursion here, because that may also try to set |
| 280 | ;; the buffer of the selected window, which fails when the selected | 282 | ;; the buffer of the selected window, which fails when the selected |
| 281 | ;; window is the minibuffer. | 283 | ;; window is the minibuffer. |
| 282 | (let ((old-buffer (current-buffer))) | 284 | (let ((old-buffer (current-buffer)) |
| 285 | (window-system-frame-alist (cdr (assq initial-window-system | ||
| 286 | window-system-default-frame-alist)))) | ||
| 283 | 287 | ||
| 284 | (when (and frame-notice-user-settings | 288 | (when (and frame-notice-user-settings |
| 285 | (null frame-initial-frame)) | 289 | (null frame-initial-frame)) |
| @@ -293,6 +297,7 @@ React to settings of `default-frame-alist', `initial-frame-alist' there." | |||
| 293 | (modify-frame-parameters nil | 297 | (modify-frame-parameters nil |
| 294 | (if (null initial-window-system) | 298 | (if (null initial-window-system) |
| 295 | (append initial-frame-alist | 299 | (append initial-frame-alist |
| 300 | window-system-frame-alist | ||
| 296 | default-frame-alist | 301 | default-frame-alist |
| 297 | parms | 302 | parms |
| 298 | nil) | 303 | nil) |
| @@ -322,6 +327,7 @@ React to settings of `default-frame-alist', `initial-frame-alist' there." | |||
| 322 | ;; switch `tool-bar-mode' off. | 327 | ;; switch `tool-bar-mode' off. |
| 323 | (when (display-graphic-p) | 328 | (when (display-graphic-p) |
| 324 | (let ((tool-bar-lines (or (assq 'tool-bar-lines initial-frame-alist) | 329 | (let ((tool-bar-lines (or (assq 'tool-bar-lines initial-frame-alist) |
| 330 | (assq 'tool-bar-lines window-system-frame-alist) | ||
| 325 | (assq 'tool-bar-lines default-frame-alist)))) | 331 | (assq 'tool-bar-lines default-frame-alist)))) |
| 326 | (when (and tool-bar-originally-present | 332 | (when (and tool-bar-originally-present |
| 327 | (or (null tool-bar-lines) | 333 | (or (null tool-bar-lines) |
| @@ -382,6 +388,7 @@ React to settings of `default-frame-alist', `initial-frame-alist' there." | |||
| 382 | ;; create here, so that its new value, gleaned from the user's | 388 | ;; create here, so that its new value, gleaned from the user's |
| 383 | ;; .emacs file, will be applied to the existing screen. | 389 | ;; .emacs file, will be applied to the existing screen. |
| 384 | (if (not (eq (cdr (or (assq 'minibuffer initial-frame-alist) | 390 | (if (not (eq (cdr (or (assq 'minibuffer initial-frame-alist) |
| 391 | (assq 'minibuffer window-system-frame-alist) | ||
| 385 | (assq 'minibuffer default-frame-alist) | 392 | (assq 'minibuffer default-frame-alist) |
| 386 | '(minibuffer . t))) | 393 | '(minibuffer . t))) |
| 387 | t)) | 394 | t)) |
| @@ -401,6 +408,7 @@ React to settings of `default-frame-alist', `initial-frame-alist' there." | |||
| 401 | (setq parms (delq (assq 'name parms) parms))) | 408 | (setq parms (delq (assq 'name parms) parms))) |
| 402 | 409 | ||
| 403 | (setq parms (append initial-frame-alist | 410 | (setq parms (append initial-frame-alist |
| 411 | window-system-frame-alist | ||
| 404 | default-frame-alist | 412 | default-frame-alist |
| 405 | parms | 413 | parms |
| 406 | nil)) | 414 | nil)) |
| @@ -480,6 +488,7 @@ React to settings of `default-frame-alist', `initial-frame-alist' there." | |||
| 480 | ;; the new parameters. | 488 | ;; the new parameters. |
| 481 | (let (newparms allparms tail) | 489 | (let (newparms allparms tail) |
| 482 | (setq allparms (append initial-frame-alist | 490 | (setq allparms (append initial-frame-alist |
| 491 | window-system-frame-alist | ||
| 483 | default-frame-alist nil)) | 492 | default-frame-alist nil)) |
| 484 | (if (assq 'height frame-initial-geometry-arguments) | 493 | (if (assq 'height frame-initial-geometry-arguments) |
| 485 | (setq allparms (assq-delete-all 'height allparms))) | 494 | (setq allparms (assq-delete-all 'height allparms))) |