aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/font-lock.el2
-rw-r--r--lisp/image.el13
-rw-r--r--lisp/startup.el13
-rw-r--r--lisp/subr.el16
5 files changed, 20 insertions, 31 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 33d7ca2f3ea..ac9426aebe7 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,12 @@
12009-09-12 Stefan Monnier <monnier@iro.umontreal.ca> 12009-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * startup.el (tutorial-directory): Make it a defcustom.
4 Use custom-initialize-delay rather than eval-at-startup to set it.
5 * image.el (image-load-path): Make it a defcustom.
6 Use custom-initialize-delay rather than eval-at-startup to set it.
7 * subr.el (eval-at-startup): Remove.
8 * font-lock.el (lisp-font-lock-keywords-2): Remove eval-at-startup.
9
3 * subr.el (do-after-load-evaluation): Warn the user after loading an 10 * subr.el (do-after-load-evaluation): Warn the user after loading an
4 obsolete package. 11 obsolete package.
5 12
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index 07d06c7b9c2..4d8198292f8 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -2265,7 +2265,7 @@ in which C preprocessor directives are used. e.g. `asm-mode' and
2265 "save-match-data" "save-current-buffer" 2265 "save-match-data" "save-current-buffer"
2266 "unwind-protect" "condition-case" "track-mouse" 2266 "unwind-protect" "condition-case" "track-mouse"
2267 "eval-after-load" "eval-and-compile" "eval-when-compile" 2267 "eval-after-load" "eval-and-compile" "eval-when-compile"
2268 "eval-when" "eval-at-startup" "eval-next-after-load" 2268 "eval-when" "eval-next-after-load"
2269 "with-case-table" "with-category-table" 2269 "with-case-table" "with-category-table"
2270 "with-current-buffer" "with-electric-help" 2270 "with-current-buffer" "with-electric-help"
2271 "with-local-quit" "with-no-warnings" 2271 "with-local-quit" "with-no-warnings"
diff --git a/lisp/image.el b/lisp/image.el
index 92e7560a9ca..e2f4977ed10 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -98,18 +98,17 @@ AUTODETECT can be
98 - maybe auto-detect only if the image type is available 98 - maybe auto-detect only if the image type is available
99 (see `image-type-available-p').") 99 (see `image-type-available-p').")
100 100
101(defvar image-load-path nil 101(defcustom image-load-path
102 (list (file-name-as-directory (expand-file-name "images" data-directory))
103 'data-directory 'load-path)
102 "List of locations in which to search for image files. 104 "List of locations in which to search for image files.
103If an element is a string, it defines a directory to search. 105If an element is a string, it defines a directory to search.
104If an element is a variable symbol whose value is a string, that 106If an element is a variable symbol whose value is a string, that
105value defines a directory to search. 107value defines a directory to search.
106If an element is a variable symbol whose value is a list, the 108If an element is a variable symbol whose value is a list, the
107value is used as a list of directories to search.") 109value is used as a list of directories to search."
108 110 :type '(repeat (choice directory variable))
109(eval-at-startup 111 :initialize 'custom-initialize-delay)
110 (setq image-load-path
111 (list (file-name-as-directory (expand-file-name "images" data-directory))
112 'data-directory 'load-path)))
113 112
114 113
115(defun image-load-path-for-library (library image &optional path no-error) 114(defun image-load-path-for-library (library image &optional path no-error)
diff --git a/lisp/startup.el b/lisp/startup.el
index fcb35b95f02..5d5f23e4453 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -388,13 +388,12 @@ from being initialized."
388Warning Warning!!! Pure space overflow !!!Warning Warning 388Warning Warning!!! Pure space overflow !!!Warning Warning
389\(See the node Pure Storage in the Lisp manual for details.)\n") 389\(See the node Pure Storage in the Lisp manual for details.)\n")
390 390
391(defvar tutorial-directory nil 391(defcustom tutorial-directory
392 "Directory containing the Emacs TUTORIAL files.") 392 (file-name-as-directory (expand-file-name "tutorials" data-directory))
393 393 "Directory containing the Emacs TUTORIAL files."
394;; Get correct value in a dumped, installed Emacs. 394 :group 'installation
395(eval-at-startup 395 :type 'directory
396 (setq tutorial-directory (file-name-as-directory 396 :initialize 'custom-initialize-delay)
397 (expand-file-name "tutorials" data-directory))))
398 397
399(defun normal-top-level-add-subdirs-to-load-path () 398(defun normal-top-level-add-subdirs-to-load-path ()
400 "Add all subdirectories of current directory to `load-path'. 399 "Add all subdirectories of current directory to `load-path'.
diff --git a/lisp/subr.el b/lisp/subr.el
index d42382d15d3..85a74183a8d 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1591,22 +1591,6 @@ and the file name is displayed in the echo area."
1591 1591
1592;;;; Specifying things to do later. 1592;;;; Specifying things to do later.
1593 1593
1594(defmacro eval-at-startup (&rest body)
1595 "Make arrangements to evaluate BODY when Emacs starts up.
1596If this is run after Emacs startup, evaluate BODY immediately.
1597Always returns nil.
1598
1599This works by adding a function to `before-init-hook'.
1600That function's doc string says which file created it."
1601 `(progn
1602 (if command-line-processed
1603 (progn . ,body)
1604 (add-hook 'before-init-hook
1605 '(lambda () ,(concat "From " (or load-file-name "no file"))
1606 . ,body)
1607 t))
1608 nil))
1609
1610(defun load-history-regexp (file) 1594(defun load-history-regexp (file)
1611 "Form a regexp to find FILE in `load-history'. 1595 "Form a regexp to find FILE in `load-history'.
1612FILE, a string, is described in the function `eval-after-load'." 1596FILE, a string, is described in the function `eval-after-load'."