]> git.eshelyaron.com Git - emacs.git/commitdiff
* startup.el (tutorial-directory): Make it a defcustom.
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 12 Sep 2009 03:55:46 +0000 (03:55 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 12 Sep 2009 03:55:46 +0000 (03:55 +0000)
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.

lisp/ChangeLog
lisp/font-lock.el
lisp/image.el
lisp/startup.el
lisp/subr.el

index 33d7ca2f3ea81016fe0d1ca141f38b23f5c24e2b..ac9426aebe77cae9ff2658183ae3ac62cbe22cf8 100644 (file)
@@ -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.
 
index 07d06c7b9c2754e852d41698c7f9cd7437c8e32b..4d8198292f8cd91e61995377fe0bf0e56725e90f 100644 (file)
@@ -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"
index 92e7560a9ca9eb2c11a9103c9a81b46a5120c77a..e2f4977ed107c68e45a5d09854845b6eada12430 100644 (file)
@@ -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)
index fcb35b95f02100ddadbe9d4aa47d48663bc272b5..5d5f23e4453fee008a76d3eb601075af42c8d237 100644 (file)
@@ -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'.
index d42382d15d36d5bae11c7c6b1053223cedb8101f..85a74183a8de0424ea4fb2ed27e36dd1a1aa56ed 100644 (file)
@@ -1591,22 +1591,6 @@ and the file name is displayed in the echo area."
 \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'."