Use custom-initialize-delay rather than eval-at-startup to set it.
* image.el (image-load-path): Make it a defcustom.
Use custom-initialize-delay rather than eval-at-startup to set it.
* subr.el (eval-at-startup): Remove.
* font-lock.el (lisp-font-lock-keywords-2): Remove eval-at-startup.
2009-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
+ * startup.el (tutorial-directory): Make it a defcustom.
+ Use custom-initialize-delay rather than eval-at-startup to set it.
+ * image.el (image-load-path): Make it a defcustom.
+ Use custom-initialize-delay rather than eval-at-startup to set it.
+ * subr.el (eval-at-startup): Remove.
+ * font-lock.el (lisp-font-lock-keywords-2): Remove eval-at-startup.
+
* subr.el (do-after-load-evaluation): Warn the user after loading an
obsolete package.
"save-match-data" "save-current-buffer"
"unwind-protect" "condition-case" "track-mouse"
"eval-after-load" "eval-and-compile" "eval-when-compile"
- "eval-when" "eval-at-startup" "eval-next-after-load"
+ "eval-when" "eval-next-after-load"
"with-case-table" "with-category-table"
"with-current-buffer" "with-electric-help"
"with-local-quit" "with-no-warnings"
- maybe auto-detect only if the image type is available
(see `image-type-available-p').")
-(defvar image-load-path nil
+(defcustom image-load-path
+ (list (file-name-as-directory (expand-file-name "images" data-directory))
+ 'data-directory 'load-path)
"List of locations in which to search for image files.
If an element is a string, it defines a directory to search.
If an element is a variable symbol whose value is a string, that
value defines a directory to search.
If an element is a variable symbol whose value is a list, the
-value is used as a list of directories to search.")
-
-(eval-at-startup
- (setq image-load-path
- (list (file-name-as-directory (expand-file-name "images" data-directory))
- 'data-directory 'load-path)))
+value is used as a list of directories to search."
+ :type '(repeat (choice directory variable))
+ :initialize 'custom-initialize-delay)
(defun image-load-path-for-library (library image &optional path no-error)
Warning Warning!!! Pure space overflow !!!Warning Warning
\(See the node Pure Storage in the Lisp manual for details.)\n")
-(defvar tutorial-directory nil
- "Directory containing the Emacs TUTORIAL files.")
-
-;; Get correct value in a dumped, installed Emacs.
-(eval-at-startup
- (setq tutorial-directory (file-name-as-directory
- (expand-file-name "tutorials" data-directory))))
+(defcustom tutorial-directory
+ (file-name-as-directory (expand-file-name "tutorials" data-directory))
+ "Directory containing the Emacs TUTORIAL files."
+ :group 'installation
+ :type 'directory
+ :initialize 'custom-initialize-delay)
(defun normal-top-level-add-subdirs-to-load-path ()
"Add all subdirectories of current directory to `load-path'.
\f
;;;; Specifying things to do later.
-(defmacro eval-at-startup (&rest body)
- "Make arrangements to evaluate BODY when Emacs starts up.
-If this is run after Emacs startup, evaluate BODY immediately.
-Always returns nil.
-
-This works by adding a function to `before-init-hook'.
-That function's doc string says which file created it."
- `(progn
- (if command-line-processed
- (progn . ,body)
- (add-hook 'before-init-hook
- '(lambda () ,(concat "From " (or load-file-name "no file"))
- . ,body)
- t))
- nil))
-
(defun load-history-regexp (file)
"Form a regexp to find FILE in `load-history'.
FILE, a string, is described in the function `eval-after-load'."