From 918df6e6dfa429e399f3291bfddaeffed72ab42a Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Wed, 28 Nov 2012 15:14:13 +0900 Subject: [PATCH] do not autoload function if it is already available --- emacs.el | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/emacs.el b/emacs.el index 2ca7ddf..a2c03ad 100644 --- a/emacs.el +++ b/emacs.el @@ -84,17 +84,18 @@ found, otherwise returns nil." (and libpath `(progn ,@(mapcar (lambda (f) - `(autoload (quote ,f) - ,libname - ,(concat "Autoloaded function defined in \"" - libpath - "\".") - t)) + (or (fboundp f) + `(autoload (quote ,f) + ,libname + ,(concat "Autoloaded function defined in \"" + libpath + "\".") + t))) (or (eval functions) `(,(eval feature)))) (eval-after-load ,feature - `(progn - ,@body)) + (quote (progn + ,@body))) ,libpath)))) (put 'lazy-load-eval 'lisp-indent-function 2)