changeset 99412:3460c51f658c

(eshell/cp): Autoload it rather than requiring things.
author Glenn Morris <rgm@gnu.org>
date Thu, 06 Nov 2008 04:16:13 +0000
parents d0da804af657
children fdc99543528e
files lisp/org/org-publish.el
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/org/org-publish.el	Thu Nov 06 03:56:27 2008 +0000
+++ b/lisp/org/org-publish.el	Thu Nov 06 04:16:13 2008 +0000
@@ -526,14 +526,11 @@
 See `org-publish-org-to' to the list of arguments."
   (org-publish-org-to "html" plist filename pub-dir))
 
+(autoload eshell/cp "em-unix")		; why the eshell version?
+
 (defun org-publish-attachment (plist filename pub-dir)
   "Publish a file with no transformation of any kind.
 See `org-publish-org-to' to the list of arguments."
-  ;; make sure eshell/cp code is loaded
-  (eval-and-compile
-    (require 'eshell)
-    (require 'esh-maint)
-    (require 'em-unix))
   (unless (file-directory-p pub-dir)
     (make-directory pub-dir t))
   (eshell/cp filename pub-dir))