diff lisp/startup.el @ 83074:34a7a8f40548

Fix background-mode on terminal frames (Dan Nicolaescu). lisp/faces.el (frame-set-background-mode): Guess the background mode on terminal frames from the termcap type string. (tty-create-frame-with-faces): Switch to the new frame during its setup. Load the customization library corresponding to the terminal type of the newly created frame. (Reported by Dan Nicolaescu <dann at ics dot uci dot edu>.) lisp/startup.el (normal-top-level): Moved background-mode heuristic to frame-set-background-mode. src/dispnew.c (init_display): Update the tty-type frame parameter of the initial terminal frame. src/frame.h (Qtty, Qtty_type): New externs. src/term.c (term_init): Update comments. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-114
author Karoly Lorentey <lorentey@elte.hu>
date Thu, 11 Mar 2004 01:11:38 +0000
parents b1f57ac99be5
children 0643dc72a250
line wrap: on
line diff
--- a/lisp/startup.el	Mon Mar 08 13:39:35 2004 +0000
+++ b/lisp/startup.el	Thu Mar 11 01:11:38 2004 +0000
@@ -434,30 +434,12 @@
 	  ;; ...-frame-alist.
 	  (if (fboundp 'frame-notice-user-settings)
 	      (frame-notice-user-settings))
+	  ;; Set the faces for the initial background mode even if
+	  ;; 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.
 	  (if (fboundp 'frame-set-background-mode)
-	      ;; Set the faces for the initial background mode even if
-	      ;; 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.
-	      (let ((frame-background-mode frame-background-mode)
-		    (frame (selected-frame))
-		    term)
-		(when (and (null initial-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"))
-		  ;; Some files in lisp/term do a better job with the
-		  ;; background mode, but we leave this here anyway, in
-		  ;; case they remove those files.
-		  (if (string-match "^\\(xterm\\|rxvt\\|dtterm\\|eterm\\)"
-				    term)
-		      (setq frame-background-mode 'light)))
-		(frame-set-background-mode (selected-frame)))))
+	      (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)
@@ -629,13 +611,12 @@
     (setq eol-mnemonic-dos  "(DOS)"
           eol-mnemonic-mac  "(Mac)")))
 
-  ;; Read window system's init file if using a window system.
+  ;; Make sure window system's init file was loaded in loadup.el if using a window system.
   (condition-case error
     (unless noninteractive
       (if (and initial-window-system
 	       (not (featurep
-		     (intern (concat (symbol-name initial-window-system)
-				     "-win")))))
+		     (intern (concat (symbol-name initial-window-system) "-win")))))
 	  (error "Unsupported window system `%s'" initial-window-system))
       ;; Process window-system specific command line parameters.
       (setq command-line-args