From 486cf3b876103af5d21eb4834cfcf1fe51c94985 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Sat, 29 Aug 2009 22:27:19 +0000 Subject: [PATCH] * subr.el (do-after-load-evaluation): Simplify. --- lisp/ChangeLog | 4 ++++ lisp/subr.el | 15 +++++---------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a06b9ff8443..0da2525f51a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2009-08-29 Juanma Barranquero + + * subr.el (do-after-load-evaluation): Simplify. + 2009-08-29 Dan Nicolaescu * vc.el (vc-print-log-internal): Move RCS/CVS specific code ... diff --git a/lisp/subr.el b/lisp/subr.el index ed85f2812a2..436da221cef 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -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. -- 2.39.2