aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTino Calancha2017-08-02 18:11:31 +0900
committerTino Calancha2017-08-02 18:11:43 +0900
commitcf1da46761675f1886e54765fa213c7bd7d93437 (patch)
tree50ea0085753122e956d8221258ed47fd2794e3e6
parent49d6e59717ad182487910b863656bb6a11080bcf (diff)
downloademacs-cf1da46761675f1886e54765fa213c7bd7d93437.tar.gz
emacs-cf1da46761675f1886e54765fa213c7bd7d93437.zip
ls-lisp: Autoload call instead of cookie
* lisp/ls-lisp.el (eshell-extended-glob): autoload call instead of cookie.
-rw-r--r--lisp/ls-lisp.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el
index 2f723ca8ac8..9a4fc197442 100644
--- a/lisp/ls-lisp.el
+++ b/lisp/ls-lisp.el
@@ -479,14 +479,19 @@ not contain `d', so that a full listing is expected."
479 (message "%s: doesn't exist or is inaccessible" file) 479 (message "%s: doesn't exist or is inaccessible" file)
480 (ding) (sit-for 2))))) ; to show user the message! 480 (ding) (sit-for 2))))) ; to show user the message!
481 481
482 482;; We cannot require 'em-glob' in the top of the file:
483(declare-function eshell-extended-glob "em-glob" (glob)) 483;; ls-lisp is compiled before than eshell, and esh-groups.el
484;; wouldn't be created yet. If we require 'em-glob' inside
485;; `ls-lisp--dired', then this function cannot be called
486;; before eshell is compiled.
487;; So instead we add an autoload call here.
488;; (https://lists.gnu.org/archive/html/emacs-devel/2017-07/msg01083.html).
489(autoload 'eshell-extended-glob "em-glob")
484(declare-function dired-read-dir-and-switches "dired" (str)) 490(declare-function dired-read-dir-and-switches "dired" (str))
485(declare-function dired-goto-next-file "dired" ()) 491(declare-function dired-goto-next-file "dired" ())
486 492
487(defun ls-lisp--dired (orig-fun dir-or-list &optional switches) 493(defun ls-lisp--dired (orig-fun dir-or-list &optional switches)
488 (interactive (dired-read-dir-and-switches "")) 494 (interactive (dired-read-dir-and-switches ""))
489 (require 'em-glob)
490 (if (consp dir-or-list) 495 (if (consp dir-or-list)
491 (funcall orig-fun dir-or-list switches) 496 (funcall orig-fun dir-or-list switches)
492 (let ((dir-wildcard (insert-directory-wildcard-in-dir-p 497 (let ((dir-wildcard (insert-directory-wildcard-in-dir-p