emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Proposal: emacs -Q option


From: Kim F. Storm
Subject: Proposal: emacs -Q option
Date: 05 Feb 2004 02:42:44 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

When I work on debugging redisplay related problems in emacs (I seem
to be doing that quite a lot), I usually need to start emacs with as
few display elements (like tool-bars, menu-bar, scroll-bars, etc) as
possible, as well as not loading any of the various init files, i.e.
like this:

        emacs -q --no-site-file --no-splash 
              --eval '(blink-cursor-mode -1)' 
              --eval '(tool-bar-mode -1)'
              --eval '(scroll-bar-mode -1)'
              --eval '(tooltip-mode -1)'
              --eval '(setq visible-bell t)'

(the last line is because the audible bell drives me crazy).

I propose to add a -Q option which is equivalent to this, i.e.

        emacs -Q

does the same thing as the above call.

Objections anyone?



Here is a patch:

--- startup.el  2004-02-05 02:27:51.000000000 +0100
***************
*** 73,78 ****
--- 73,83 ----
  ;; -no-splash                 Don't display a splash screen on startup.
  ;; --no-splash
  ;; -------------------------
+ ;; -Q                        Quick startup.  Do not load any of user's init
+ ;;                         file, "default.el", or "site-start".  Disable
+ ;;                         the tool-bar, menu-bar, scroll-bars, tool-tips,
+ ;;                         the spash screen, and the blinking cursor.
+ ;; -------------------------
  ;; -u USER                   Load USER's init file instead of the init
  ;; -user USER                file belonging to the user starting Emacs.
  ;; --user USER
***************
*** 359,364 ****
--- 364,371 ----
                 string)
    :group 'auto-save)
  
+ (defvar emacs-quick-startup nil)
+ 
  (defvar init-file-debug nil)
  
  (defvar init-file-had-error nil)
***************
*** 777,782 ****
--- 784,795 ----
                (setq argval nil
                        argi orig-argi)))))
        (cond
+        ((equal argi "-Q")
+         (setq init-file-user nil
+               site-run-file nil
+               visible-bell t
+               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"))
***************
*** 808,825 ****
--- 821,841 ----
  
    ;; 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)
***************
*** 841,846 ****
--- 857,863 ----
        (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)
***************
*** 1744,1754 ****
                 (list-buffers)))))
  
    ;; Maybe display a startup screen.
!   (when (and (not inhibit-startup-message) (not noninteractive)
             ;; Don't display startup screen if init file
             ;; has started some sort of server.
!            (not (and (fboundp 'process-list)
!                      (process-list))))
      ;; Display a startup screen, after some preparations.
  
      ;; If there are no switches to process, we might as well
--- 1761,1773 ----
                 (list-buffers)))))
  
    ;; Maybe display a startup screen.
!   (unless (or inhibit-startup-message
!             noninteractive
!             emacs-quick-startup
             ;; Don't display startup screen if init file
             ;; has started some sort of server.
!            (and (fboundp 'process-list)
!                 (process-list)))
      ;; Display a startup screen, after some preparations.
  
      ;; If there are no switches to process, we might as well



-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

[Prev in Thread] Current Thread [Next in Thread]