* 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.
This commit is contained in:
parent
5766c380ee
commit
45448e641a
5 changed files with 20 additions and 31 deletions
|
|
@ -1,5 +1,12 @@
|
|||
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.
|
||||
|
||||
|
|
|
|||
|
|
@ -2265,7 +2265,7 @@ in which C preprocessor directives are used. e.g. `asm-mode' and
|
|||
"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"
|
||||
|
|
|
|||
|
|
@ -98,18 +98,17 @@ AUTODETECT can be
|
|||
- 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)
|
||||
|
|
|
|||
|
|
@ -388,13 +388,12 @@ from being initialized."
|
|||
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'.
|
||||
|
|
|
|||
16
lisp/subr.el
16
lisp/subr.el
|
|
@ -1591,22 +1591,6 @@ and the file name is displayed in the echo area."
|
|||
|
||||
;;;; 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'."
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue