]> code.delx.au - gnu-emacs/commitdiff
(emacs-quick-startup): New defvar (set by -Q).
authorKim F. Storm <storm@cua.dk>
Tue, 13 Apr 2004 22:20:04 +0000 (22:20 +0000)
committerKim F. Storm <storm@cua.dk>
Tue, 13 Apr 2004 22:20:04 +0000 (22:20 +0000)
(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.

lisp/startup.el

index 77bb6e76732048a74bb4d9901f9c4067c75de2c9..9192b60971cf1f16abd94476585a357aa952e004 100644 (file)
@@ -267,6 +267,8 @@ from being initialized."
                 string)
   :group 'auto-save)
 
+(defvar emacs-quick-startup nil)
+
 (defvar init-file-debug nil)
 
 (defvar init-file-had-error nil)
@@ -685,6 +687,11 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
                (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 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
 
   ;; 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 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
       (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 @@ where FACE is a valid face specification, as it can be used with
     (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 @@ normal otherwise."
                (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