changeset 54852:dd005a791c40

(emacs-quick-startup): New defvar (set by -Q). (command-line): New option -Q. Like -q --no-site-file, but in addition it also disables menu-bar, tool-bar, scroll-bars, tool-tips, and the blinking cursor. (command-line-1): Skip startup screen if -Q. (fancy-splash-head): Use :align-to center prop to center splash image.
author Kim F. Storm <storm@cua.dk>
date Tue, 13 Apr 2004 22:20:04 +0000
parents 99eea8becc4f
children 429f2746c125
files lisp/startup.el
diffstat 1 files changed, 18 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/startup.el	Tue Apr 13 21:46:30 2004 +0000
+++ b/lisp/startup.el	Tue Apr 13 22:20:04 2004 +0000
@@ -267,6 +267,8 @@
 		 string)
   :group 'auto-save)
 
+(defvar emacs-quick-startup nil)
+
 (defvar init-file-debug nil)
 
 (defvar init-file-had-error nil)
@@ -685,6 +687,11 @@
 		(setq argval nil
                       argi orig-argi)))))
 	(cond
+	 ((equal argi "-Q")
+	  (setq init-file-user nil
+		site-run-file nil
+		emacs-quick-startup t)
+	  (push '(vertical-scroll-bars . nil) initial-frame-alist))
 	 ((member argi '("-q" "-no-init-file"))
 	  (setq init-file-user nil))
 	 ((member argi '("-u" "-user"))
@@ -716,18 +723,21 @@
 
   ;; If frame was created with a menu bar, set menu-bar-mode on.
   (unless (or noninteractive
+	      emacs-quick-startup
               (and (memq window-system '(x w32))
                    (<= (frame-parameter nil 'menu-bar-lines) 0)))
     (menu-bar-mode 1))
 
   ;; If frame was created with a tool bar, switch tool-bar-mode on.
   (unless (or noninteractive
+	      emacs-quick-startup
               (not (display-graphic-p))
               (<= (frame-parameter nil 'tool-bar-lines) 0))
     (tool-bar-mode 1))
 
   ;; Can't do this init in defcustom because window-system isn't set.
   (unless (or noninteractive
+	      emacs-quick-startup
               (eq system-type 'ms-dos)
               (not (memq window-system '(x w32))))
     (setq-default blink-cursor t)
@@ -749,6 +759,7 @@
       (normal-erase-is-backspace-mode 1)))
 
   (unless (or noninteractive
+	      emacs-quick-startup
               (not (display-graphic-p))
               (not (fboundp 'x-show-tip)))
     (setq-default tooltip-mode t)
@@ -1102,8 +1113,8 @@
     (when img
       (when (> window-width image-width)
 	;; Center the image in the window.
-	(let ((pos (/ (- window-width image-width) 2)))
-	  (insert (propertize " " 'display `(space :align-to ,pos))))
+	(insert (propertize " " 'display
+			    `(space :align-to (+ center (-0.5 . ,img)))))
 
 	;; Change the color of the XPM version of the splash image
 	;; so that it is visible with a dark frame background.
@@ -1652,11 +1663,13 @@
                (list-buffers)))))
 
   ;; Maybe display a startup screen.
-  (when (and (not inhibit-startup-message) (not noninteractive)
+  (unless (or inhibit-startup-message
+	      noninteractive
+	      emacs-quick-startup
 	     ;; Don't display startup screen if init file
 	     ;; has started some sort of server.
-	     (not (and (fboundp 'process-list)
-		       (process-list))))
+	     (and (fboundp 'process-list)
+		  (process-list)))
     ;; Display a startup screen, after some preparations.
 
     ;; If there are no switches to process, we might as well