emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master cf1da46: ls-lisp: Autoload call instead of cookie


From: Tino Calancha
Subject: [Emacs-diffs] master cf1da46: ls-lisp: Autoload call instead of cookie
Date: Wed, 2 Aug 2017 05:12:19 -0400 (EDT)

branch: master
commit cf1da46761675f1886e54765fa213c7bd7d93437
Author: Tino Calancha <address@hidden>
Commit: Tino Calancha <address@hidden>

    ls-lisp: Autoload call instead of cookie
    
    * lisp/ls-lisp.el (eshell-extended-glob): autoload call instead of cookie.
---
 lisp/ls-lisp.el | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el
index 2f723ca..9a4fc19 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."
        (message "%s: doesn't exist or is inaccessible" file)
        (ding) (sit-for 2)))))          ; to show user the message!
 
-
-(declare-function eshell-extended-glob "em-glob" (glob))
+;; We cannot require 'em-glob' in the top of the file:
+;; ls-lisp is compiled before than eshell, and esh-groups.el
+;; wouldn't be created yet.  If we require 'em-glob' inside
+;; `ls-lisp--dired', then this function cannot be called
+;; before eshell is compiled.
+;; So instead we add an autoload call here.
+;; (https://lists.gnu.org/archive/html/emacs-devel/2017-07/msg01083.html).
+(autoload 'eshell-extended-glob "em-glob")
 (declare-function dired-read-dir-and-switches "dired" (str))
 (declare-function dired-goto-next-file "dired" ())
 
 (defun ls-lisp--dired (orig-fun dir-or-list &optional switches)
   (interactive (dired-read-dir-and-switches ""))
-  (require 'em-glob)
   (if (consp dir-or-list)
       (funcall orig-fun dir-or-list switches)
     (let ((dir-wildcard (insert-directory-wildcard-in-dir-p



reply via email to

[Prev in Thread] Current Thread [Next in Thread]