Mercurial > emacs
diff lisp/subr.el @ 104715:b4c0b272ac7a
* subr.el (do-after-load-evaluation): Simplify.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Sat, 29 Aug 2009 22:27:19 +0000 |
parents | caa79498564a |
children | 8224438aa3cd |
line wrap: on
line diff
--- a/lisp/subr.el Sat Aug 29 19:44:39 2009 +0000 +++ b/lisp/subr.el Sat Aug 29 22:27:19 2009 +0000 @@ -1688,16 +1688,11 @@ (defun do-after-load-evaluation (abs-file) "Evaluate all `eval-after-load' forms, if any, for ABS-FILE. ABS-FILE, a string, should be the absolute true name of a file just loaded." - (let ((after-load-elts after-load-alist) - a-l-element file-elements file-element form) - (while after-load-elts - (setq a-l-element (car after-load-elts) - after-load-elts (cdr after-load-elts)) - (when (and (stringp (car a-l-element)) - (string-match (car a-l-element) abs-file)) - (while (setq a-l-element (cdr a-l-element)) ; discard the file name - (setq form (car a-l-element)) - (eval form)))))) + (dolist (a-l-element after-load-alist) + (when (and (stringp (car a-l-element)) + (string-match-p (car a-l-element) abs-file)) + ;; discard the file name regexp + (mapc #'eval (cdr a-l-element))))) (defun eval-next-after-load (file) "Read the following input sexp, and run it whenever FILE is loaded.