Mercurial > emacs
comparison lisp/startup.el @ 63859:250dde129264
(normal-top-level): Set default-frame-background-mode
instead of frame-background-mode. Before setting it, test for its
nil value. Remove tests for frame-background-mode and frame
parameter `reverse'. Add test for "unspecified-fg".
author | Juri Linkov <juri@jurta.org> |
---|---|
date | Wed, 29 Jun 2005 20:55:30 +0000 |
parents | 977d18df13bb |
children | fa8a3545cd6b bb71c6cf2009 |
comparison
equal
deleted
inserted
replaced
63858:379e37eca752 | 63859:250dde129264 |
---|---|
442 (if (fboundp 'frame-set-background-mode) | 442 (if (fboundp 'frame-set-background-mode) |
443 ;; Set the faces for the initial background mode even if | 443 ;; Set the faces for the initial background mode even if |
444 ;; frame-notice-user-settings didn't (such as on a tty). | 444 ;; frame-notice-user-settings didn't (such as on a tty). |
445 ;; frame-set-background-mode is idempotent, so it won't | 445 ;; frame-set-background-mode is idempotent, so it won't |
446 ;; cause any harm if it's already been done. | 446 ;; cause any harm if it's already been done. |
447 (let ((frame-background-mode frame-background-mode) | 447 (let ((frame (selected-frame)) |
448 (frame (selected-frame)) | |
449 term) | 448 term) |
450 (when (and (null window-system) | 449 (when (and (null window-system) |
451 ;; Don't override a possibly customized value. | 450 ;; Don't override default set by files in lisp/term. |
452 (null frame-background-mode) | 451 (null default-frame-background-mode) |
453 ;; Don't override user specifications. | |
454 (null (frame-parameter frame 'reverse)) | |
455 (let ((bg (frame-parameter frame 'background-color))) | 452 (let ((bg (frame-parameter frame 'background-color))) |
456 (or (null bg) | 453 (or (null bg) |
457 (member bg '(unspecified "unspecified-bg"))))) | 454 (member bg '(unspecified "unspecified-bg" |
455 "unspecified-fg"))))) | |
456 | |
458 (setq term (getenv "TERM")) | 457 (setq term (getenv "TERM")) |
459 ;; Some files in lisp/term do a better job with the | 458 ;; Some files in lisp/term do a better job with the |
460 ;; background mode, but we leave this here anyway, in | 459 ;; background mode, but we leave this here anyway, in |
461 ;; case they remove those files. | 460 ;; case they remove those files. |
462 (if (string-match "^\\(xterm\\|rxvt\\|dtterm\\|eterm\\)" | 461 (if (string-match "^\\(xterm\\|rxvt\\|dtterm\\|eterm\\)" |
463 term) | 462 term) |
464 (setq frame-background-mode 'light))) | 463 (setq default-frame-background-mode 'light))) |
465 (frame-set-background-mode (selected-frame))))) | 464 (frame-set-background-mode (selected-frame))))) |
466 | 465 |
467 ;; Now we know the user's default font, so add it to the menu. | 466 ;; Now we know the user's default font, so add it to the menu. |
468 (if (fboundp 'font-menu-add-default) | 467 (if (fboundp 'font-menu-add-default) |
469 (font-menu-add-default)) | 468 (font-menu-add-default)) |