]> git.eshelyaron.com Git - emacs.git/commitdiff
* subr.el (do-after-load-evaluation): Simplify.
authorJuanma Barranquero <lekktu@gmail.com>
Sat, 29 Aug 2009 22:27:19 +0000 (22:27 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Sat, 29 Aug 2009 22:27:19 +0000 (22:27 +0000)
lisp/ChangeLog
lisp/subr.el

index a06b9ff84437a04df5069cbc2c0354f7d674c960..0da2525f51a7c8c490c8d5d7a67e449b427daa9e 100644 (file)
@@ -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 ...
index ed85f2812a2601866f829a51301ceccf201c220a..436da221cefbe9f16a713e94032947519a44454a 100644 (file)
@@ -1688,16 +1688,11 @@ This function makes or adds to an entry on `after-load-alist'."
 (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.