comparison lisp/startup.el @ 90199:bb71c6cf2009

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-67 Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 447-458) - Update from CVS - Update from CVS: lisp/subr.el (add-to-ordered-list): Doc fix. - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 83-85) - Merge from emacs--cvs-trunk--0 - Update from CVS
author Miles Bader <miles@gnu.org>
date Thu, 30 Jun 2005 00:31:46 +0000
parents b7da78284d4c 250dde129264
children f9a65d7ebd29
comparison
equal deleted inserted replaced
90198:97f6c3a96df1 90199:bb71c6cf2009
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))