Mercurial > emacs
changeset 33014:2eb3adfaa01f
(normal-top-level): If the value of $TERM indicates that
we are running from xterm or one of its work-alikes, default to a
light background mode.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 28 Oct 2000 18:46:10 +0000 |
parents | b81a0bbc5682 |
children | c50588266cd5 |
files | lisp/startup.el |
diffstat | 1 files changed, 16 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/startup.el Sat Oct 28 17:25:46 2000 +0000 +++ b/lisp/startup.el Sat Oct 28 18:46:10 2000 +0000 @@ -478,7 +478,22 @@ ;; frame-notice-user-settings didn't (such as on a tty). ;; frame-set-background-mode is idempotent, so it won't ;; cause any harm if it's already been done. - (frame-set-background-mode (selected-frame))) + (let ((frame-background-mode frame-background-mode) + (frame (selected-frame)) + term) + (when (and (null window-system) + ;; Don't override a possibly customized value. + (null frame-background-mode) + ;; Don't override user specifications. + (null (frame-parameter frame 'reverse)) + (let ((bg (frame-parameter frame 'background-color))) + (or (null bg) + (member bg '(unspecified "unspecified-bg"))))) + (setq term (getenv "TERM")) + (if (string-match "^\\(xterm\\|rxvt\\|dtterm\\|eterm\\)" + term) + (setq frame-background-mode 'light))) + (frame-set-background-mode (selected-frame)))) ;; Now we know the user's default font, so add it to the menu. (if (fboundp 'font-menu-add-default)