aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorJuri Linkov2005-06-29 20:55:30 +0000
committerJuri Linkov2005-06-29 20:55:30 +0000
commit61b91ad13bcf6b51756593229899a0612a306197 (patch)
tree652a6d397cbc58bf4d15ca9f20a4ca5ed11eef63 /lisp
parenta4ea869cfd4da4dd49e81941be0a3e07533bc210 (diff)
downloademacs-61b91ad13bcf6b51756593229899a0612a306197.tar.gz
emacs-61b91ad13bcf6b51756593229899a0612a306197.zip
(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".
Diffstat (limited to 'lisp')
-rw-r--r--lisp/startup.el15
1 files changed, 7 insertions, 8 deletions
diff --git a/lisp/startup.el b/lisp/startup.el
index 6af6e748ee5..f8c4958c122 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -444,24 +444,23 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
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.