aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim F. Storm2004-04-13 22:20:04 +0000
committerKim F. Storm2004-04-13 22:20:04 +0000
commite2c608243a2565699ff13d6d5a423aa8e5a6531e (patch)
tree83e63f78999059f204829fda3cad8e49380231fd
parent3ffc8a8a0dfa820b051d04b32416ba3812c6aaba (diff)
downloademacs-e2c608243a2565699ff13d6d5a423aa8e5a6531e.tar.gz
emacs-e2c608243a2565699ff13d6d5a423aa8e5a6531e.zip
(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.
-rw-r--r--lisp/startup.el23
1 files changed, 18 insertions, 5 deletions
diff --git a/lisp/startup.el b/lisp/startup.el
index 77bb6e76732..9192b60971c 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -267,6 +267,8 @@ from being initialized."
267 string) 267 string)
268 :group 'auto-save) 268 :group 'auto-save)
269 269
270(defvar emacs-quick-startup nil)
271
270(defvar init-file-debug nil) 272(defvar init-file-debug nil)
271 273
272(defvar init-file-had-error nil) 274(defvar init-file-had-error nil)
@@ -685,6 +687,11 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
685 (setq argval nil 687 (setq argval nil
686 argi orig-argi))))) 688 argi orig-argi)))))
687 (cond 689 (cond
690 ((equal argi "-Q")
691 (setq init-file-user nil
692 site-run-file nil
693 emacs-quick-startup t)
694 (push '(vertical-scroll-bars . nil) initial-frame-alist))
688 ((member argi '("-q" "-no-init-file")) 695 ((member argi '("-q" "-no-init-file"))
689 (setq init-file-user nil)) 696 (setq init-file-user nil))
690 ((member argi '("-u" "-user")) 697 ((member argi '("-u" "-user"))
@@ -716,18 +723,21 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
716 723
717 ;; If frame was created with a menu bar, set menu-bar-mode on. 724 ;; If frame was created with a menu bar, set menu-bar-mode on.
718 (unless (or noninteractive 725 (unless (or noninteractive
726 emacs-quick-startup
719 (and (memq window-system '(x w32)) 727 (and (memq window-system '(x w32))
720 (<= (frame-parameter nil 'menu-bar-lines) 0))) 728 (<= (frame-parameter nil 'menu-bar-lines) 0)))
721 (menu-bar-mode 1)) 729 (menu-bar-mode 1))
722 730
723 ;; If frame was created with a tool bar, switch tool-bar-mode on. 731 ;; If frame was created with a tool bar, switch tool-bar-mode on.
724 (unless (or noninteractive 732 (unless (or noninteractive
733 emacs-quick-startup
725 (not (display-graphic-p)) 734 (not (display-graphic-p))
726 (<= (frame-parameter nil 'tool-bar-lines) 0)) 735 (<= (frame-parameter nil 'tool-bar-lines) 0))
727 (tool-bar-mode 1)) 736 (tool-bar-mode 1))
728 737
729 ;; Can't do this init in defcustom because window-system isn't set. 738 ;; Can't do this init in defcustom because window-system isn't set.
730 (unless (or noninteractive 739 (unless (or noninteractive
740 emacs-quick-startup
731 (eq system-type 'ms-dos) 741 (eq system-type 'ms-dos)
732 (not (memq window-system '(x w32)))) 742 (not (memq window-system '(x w32))))
733 (setq-default blink-cursor t) 743 (setq-default blink-cursor t)
@@ -749,6 +759,7 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
749 (normal-erase-is-backspace-mode 1))) 759 (normal-erase-is-backspace-mode 1)))
750 760
751 (unless (or noninteractive 761 (unless (or noninteractive
762 emacs-quick-startup
752 (not (display-graphic-p)) 763 (not (display-graphic-p))
753 (not (fboundp 'x-show-tip))) 764 (not (fboundp 'x-show-tip)))
754 (setq-default tooltip-mode t) 765 (setq-default tooltip-mode t)
@@ -1102,8 +1113,8 @@ where FACE is a valid face specification, as it can be used with
1102 (when img 1113 (when img
1103 (when (> window-width image-width) 1114 (when (> window-width image-width)
1104 ;; Center the image in the window. 1115 ;; Center the image in the window.
1105 (let ((pos (/ (- window-width image-width) 2))) 1116 (insert (propertize " " 'display
1106 (insert (propertize " " 'display `(space :align-to ,pos)))) 1117 `(space :align-to (+ center (-0.5 . ,img)))))
1107 1118
1108 ;; Change the color of the XPM version of the splash image 1119 ;; Change the color of the XPM version of the splash image
1109 ;; so that it is visible with a dark frame background. 1120 ;; so that it is visible with a dark frame background.
@@ -1652,11 +1663,13 @@ normal otherwise."
1652 (list-buffers))))) 1663 (list-buffers)))))
1653 1664
1654 ;; Maybe display a startup screen. 1665 ;; Maybe display a startup screen.
1655 (when (and (not inhibit-startup-message) (not noninteractive) 1666 (unless (or inhibit-startup-message
1667 noninteractive
1668 emacs-quick-startup
1656 ;; Don't display startup screen if init file 1669 ;; Don't display startup screen if init file
1657 ;; has started some sort of server. 1670 ;; has started some sort of server.
1658 (not (and (fboundp 'process-list) 1671 (and (fboundp 'process-list)
1659 (process-list)))) 1672 (process-list)))
1660 ;; Display a startup screen, after some preparations. 1673 ;; Display a startup screen, after some preparations.
1661 1674
1662 ;; If there are no switches to process, we might as well 1675 ;; If there are no switches to process, we might as well