diff lisp/startup.el @ 24980:54725e0c4950

(command-line-1): Activate tooltip mode if interactive. (command-line-1): Call make-mode-line-mouse-sensitive. (command-line): Register default tty colors.
author Gerd Moellmann <gerd@gnu.org>
date Wed, 21 Jul 1999 21:43:03 +0000
parents 702b3d792db9
children a29c760f50ee
line wrap: on
line diff
--- a/lisp/startup.el	Wed Jul 21 05:53:29 1999 +0000
+++ b/lisp/startup.el	Wed Jul 21 21:43:03 1999 +0000
@@ -780,6 +780,18 @@
 	(set-buffer "*scratch*")
 	(if (eq major-mode 'fundamental-mode)
 	    (funcall initial-major-mode))))
+
+  ;; Register default TTY colors for the case the terminal hasn't a
+  ;; terminal init file.  The colors are good for xterm-color and the
+  ;; FreeBSD console (cons.*).  They should be sufficient for Linux
+  ;; too, I guess.
+  (let ((colors '("black" "red" "green" "yellow" "blue" "magenta"
+		  "cyan" "white"))
+	(i 0))
+    (while colors
+      (face-register-tty-color (car colors) i)
+      (setq colors (cdr colors) i (1+ i))))
+  
   ;; Load library for our terminal type.
   ;; User init file can set term-file-prefix to nil to prevent this.
   (and term-file-prefix (not noninteractive) (not window-system)
@@ -841,6 +853,9 @@
 		   "For information about the GNU Project and its goals, type C-h C-p."
 		 (substitute-command-keys
 		  "For information about the GNU Project and its goals, type \\[describe-project]."))))
+  (when (and (not noninteractive)
+	     (memq window-system '(x w32)))
+    (make-mode-line-mouse-sensitive))
   (if (null command-line-args-left)
       (cond ((and (not inhibit-startup-message) (not noninteractive)
 		  ;; Don't clobber a non-scratch buffer if init file
@@ -866,8 +881,8 @@
 	     (setq window-setup-hook nil)
 	     ;; Do this now to avoid an annoying delay if the user
 	     ;; clicks the menu bar during the sit-for.
-	     (if (memq window-system '(x w32))
-		 (precompute-menubar-bindings))
+	     (when (memq window-system '(x w32))
+	       (precompute-menubar-bindings))
 	     (setq menubar-bindings-done t)
 	     (when (= (buffer-size) 0)
 	       (let ((buffer-undo-list t))