[Top][All Lists]

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

Re: Scratch buffer annoyance

From: Juri Linkov
Subject: Re: Scratch buffer annoyance
Date: Wed, 01 Aug 2007 19:45:55 +0300
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

> Maybe we should have
> initial-visitor just evaluated.  Then one can set it to (find-file
> "~/") or (display-splash-screen) or (switch-to-buffer "*scratch*").

Yes, then it would be easier to customize and precisely distinguish
different meanings of string values:

(defcustom startup-function nil
  "Function to call after starting Emacs."
  :type '(choice
          (const :tag "Splash screen" nil)
          (list :tag "Directory"
                (const :value dired)
                (directory :tag "Directory name" :value "~/"))
          (list :tag "File"
                (const :value find-file)
                (file :tag "File name" :value "~/new.txt"))
          (list :tag "Buffer"
                (const :value switch-to-buffer)
                (string :tag "Buffer name" :value "*scratch*")))
  :version "23.1"
  :group 'initialization)

And to eval one of the predefined non-nil funcalls:

(dired "~/")
(find-file "~/new.txt")
(switch-to-buffer "*scratch*")

Juri Linkov

reply via email to

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