[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/subr.el
From: |
Richard M . Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/subr.el |
Date: |
Sat, 22 Oct 2005 11:23:00 -0400 |
Index: emacs/lisp/subr.el
diff -c emacs/lisp/subr.el:1.481 emacs/lisp/subr.el:1.482
*** emacs/lisp/subr.el:1.481 Sat Oct 22 15:01:08 2005
--- emacs/lisp/subr.el Sat Oct 22 15:23:00 2005
***************
*** 1322,1328 ****
file)))
! ;;;; Specifying things to do after certain files are loaded.
(defun eval-after-load (file form)
"Arrange that, if FILE is ever loaded, FORM will be run at that time.
--- 1322,1344 ----
file)))
! ;;;; 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 eval-after-load (file form)
"Arrange that, if FILE is ever loaded, FORM will be run at that time.