(eshell/cp): Autoload it rather than requiring things.
authorGlenn Morris <rgm@gnu.org>
Thu, 6 Nov 2008 04:16:28 +0000 (04:16 +0000)
committerGlenn Morris <rgm@gnu.org>
Thu, 6 Nov 2008 04:16:28 +0000 (04:16 +0000)
lisp/org/ChangeLog
lisp/org/org-publish.el

index 82de83a..3422ad5 100644 (file)
@@ -1,3 +1,7 @@
+2008-11-06  Glenn Morris  <rgm@gnu.org>
+
+       * org-publish.el (eshell/cp): Autoload it rather than requiring things.
+
 2008-11-04  Juanma Barranquero  <lekktu@gmail.com>
 
        * org.el (org-columns-modify-value-for-display-function):
index 2af71d3..ba55cdd 100644 (file)
@@ -526,14 +526,11 @@ See `org-publish-org-to' to the list of arguments."
 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))