changeset 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 4b5f6ffc0b26
children 0e9469d1d59c
files lisp/ChangeLog lisp/subr.el
diffstat 2 files changed, 9 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sat Aug 29 19:44:39 2009 +0000
+++ b/lisp/ChangeLog	Sat Aug 29 22:27:19 2009 +0000
@@ -1,3 +1,7 @@
+2009-08-29  Juanma Barranquero  <lekktu@gmail.com>
+
+	* subr.el (do-after-load-evaluation): Simplify.
+
 2009-08-29  Dan Nicolaescu  <dann@ics.uci.edu>
 
 	* vc.el (vc-print-log-internal): Move RCS/CVS specific code ...
--- 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.