emacs-devel
[Top][All Lists]
Advanced

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

Re: New start up splash screen annoyance...


From: Juri Linkov
Subject: Re: New start up splash screen annoyance...
Date: Sun, 23 Sep 2007 01:16:41 +0300
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux)

There was a criticism on this thread in regard to inconsistence of the new
user option `initial-buffer-choice'.  I now realized what is wrong and how
to fix this inconsistence.

This option can't coexist with `inhibit-startup-screen' because it mostly
duplicates the purpose of `inhibit-startup-screen' and thus causes confusion.

Much better would be to remove this new user option, and allow string values
in `inhibit-startup-screen'.  So if its value is a string then instead of
displaying the startup screen, visit the specified file or directory using
the same logic of displaying the startup screen window (taking into account
command line arguments, etc.)  The value t completely inhibits the
startup screen.  A special value for displaying the *scratch* buffer is
not needed, because when `inhibit-startup-screen' is t, the *scratch* buffer
is displayed anyway as the last buffer created on the Emacs startup.

Index: lisp/startup.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/startup.el,v
retrieving revision 1.460
diff -c -r1.460 startup.el
*** lisp/startup.el     22 Sep 2007 14:02:26 -0000      1.460
--- lisp/startup.el     22 Sep 2007 22:11:00 -0000
***************
*** 47,72 ****
    "Emacs start-up procedure."
    :group 'environment)
  
- (defcustom initial-buffer-choice nil
-   "Buffer to show after starting Emacs.
- If the value is nil and `inhibit-startup-screen' is nil, show the
- startup screen.  If the value is string, visit the specified file or
- directory using `find-file'.  If t, open the `*scratch*' buffer."
-   :type '(choice
-         (const     :tag "Startup screen" nil)
-         (directory :tag "Directory" :value "~/")
-         (file      :tag "File" :value "~/file.txt")
-         (const     :tag "Lisp scratch buffer" t))
-   :version "23.1"
-   :group 'initialization)
- 
  (defcustom inhibit-startup-screen nil
    "Non-nil inhibits the startup screen.
  It also inhibits display of the initial message in the `*scratch*' buffer.
  
  This is for use in your personal init file (but NOT site-start.el), once
  you are familiar with the contents of the startup screen."
!   :type 'boolean
    :group 'initialization)
  
  (defvaralias 'inhibit-splash-screen 'inhibit-startup-screen)
--- 47,69 ----
    "Emacs start-up procedure."
    :group 'environment)
  
  (defcustom inhibit-startup-screen nil
    "Non-nil inhibits the startup screen.
  It also inhibits display of the initial message in the `*scratch*' buffer.
  
+ If the value is nil, show the startup screen.  If the value is string,
+ then instead of displaying the startup screen visit the specified file
+ or directory using `find-file'.  If the value is t, then completely
+ inhibit any special display, thus leave Emacs showing the buffer that
+ happens to be the last visited buffer after the Emacs startup procedure.
+ 
  This is for use in your personal init file (but NOT site-start.el), once
  you are familiar with the contents of the startup screen."
!   :type '(choice
!         (const     :tag "Startup screen" nil)
!         (directory :tag "Directory" :value "~/")
!         (file      :tag "File" :value "~/file.txt")
!         (const     :tag "No startup screen" t))
    :group 'initialization)
  
  (defvaralias 'inhibit-splash-screen 'inhibit-startup-screen)
***************
*** 1904,1914 ****
  
  If CONCISE is non-nil, display a concise version of the startup
  screen."
!   ;; Prevent recursive calls from server-process-filter.
!   (if (not (get-buffer "*GNU Emacs*"))
!       (if (use-fancy-splash-screens-p)
!                 (fancy-startup-screen concise)
!               (normal-splash-screen t))))
  
  (defun display-about-screen ()
    "Display the *About GNU Emacs* buffer.
--- 1901,1917 ----
  
  If CONCISE is non-nil, display a concise version of the startup
  screen."
!   (cond
!    ((stringp inhibit-startup-screen)
!     (if concise
!       (display-buffer (find-file-noselect inhibit-startup-screen))
!       (find-file inhibit-startup-screen)))
!    ((null inhibit-startup-screen)
!     ;; Prevent recursive calls from server-process-filter.
!     (if (not (get-buffer "*GNU Emacs*"))
!       (if (use-fancy-splash-screens-p)
!           (fancy-startup-screen concise)
!         (normal-splash-screen t))))))
  
  (defun display-about-screen ()
    "Display the *About GNU Emacs* buffer.
***************
*** 2139,2152 ****
            ;; abort later.
            (unless (frame-live-p (selected-frame)) (kill-emacs nil))))))
  
!     (when initial-buffer-choice
!       (cond ((eq initial-buffer-choice t)
!            (switch-to-buffer (get-buffer-create "*scratch*")))
!           ((stringp initial-buffer-choice)
!            (find-file initial-buffer-choice))))
! 
!     (if (or inhibit-startup-screen
!           initial-buffer-choice
            noninteractive
            emacs-quick-startup)
  
--- 2142,2148 ----
            ;; abort later.
            (unless (frame-live-p (selected-frame)) (kill-emacs nil))))))
  
!     (if (or (eq inhibit-startup-screen t)
            noninteractive
            emacs-quick-startup)

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

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