unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Tino Calancha <tino.calancha@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: rgm@gnu.org, tino.calancha@gmail.com, nomiya@galaxy.dti.ne.jp,
	emacs-devel@gnu.org
Subject: Re: make bootstrap error
Date: Mon, 31 Jul 2017 00:36:50 +0900	[thread overview]
Message-ID: <877eyq6inh.fsf@calancha-pc> (raw)
In-Reply-To: <83379e2ew4.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 30 Jul 2017 17:11:39 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Tino Calancha <tino.calancha@gmail.com>
>> Date: Sun, 30 Jul 2017 20:35:06 +0900 (JST)
>> cc: rgm@gnu.org, eliz@gnu.org, Emacs developers <emacs-devel@gnu.org>
>> 
>> > After commit 6f6639d6ed6c6314b2643f6c22498fc2e23d34c7
>> > ls-lisp.el requires 'em-glob.  When eshell package is
>> > compiled, teh following file is generated:
>> > esh-groups.el
>> >
>> > but ls-lisp.el is compiled _before_ eshell, so that
>> > esh-groups.el doesn't exist yet.
>> 
>> I moved the "(require 'em-glob)" inside `ls-lisp--dired'
>> to not break the build.
>
> Thanks, but I think this is still a bit fragile: it assumes that
> ls-lisp--dired will never be called before Eshell files are compiled,
> which might one day become false.
>
> How about simply adding to ls-lisp.el an autoload form for em-glob,
> instead of requiring it (with a suitable comment explaining why it is
> there)?
Thanks for the suggestion.
Proposed patch below:
--8<-----------------------------cut here---------------start------------->8---
commit 7bbc5990c05839520bae0deb407cba17f89b002e
Author: Tino Calancha <tino.calancha@gmail.com>
Date:   Mon Jul 31 00:33:33 2017 +0900

    ls-lisp: Autoload call instead of cookie
    
    * lisp/ls-lisp.el (eshell-extended-glob): autoload call instead of cookie.

diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el
index 2f723ca8ac..9a4fc19744 100644
--- a/lisp/ls-lisp.el
+++ b/lisp/ls-lisp.el
@@ -479,14 +479,19 @@ ls-lisp-insert-directory
 	(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

--8<-----------------------------cut here---------------end--------------->8---
In GNU Emacs 26.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
 of 2017-07-30
Repository revision: c8f44e4b53c40dfea1c83ad0ff3bd653e72c4f4e



  reply	other threads:[~2017-07-30 15:36 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-30  4:20 make bootstrap error Masaru Nomiya
2017-07-30  5:11 ` Tino Calancha
2017-07-30 11:35   ` Tino Calancha
2017-07-30 12:42     ` Masaru Nomiya
2017-07-30 12:56       ` Tino Calancha
2017-07-30 14:11     ` Eli Zaretskii
2017-07-30 15:36       ` Tino Calancha [this message]
2017-07-30 15:55         ` Eli Zaretskii
2017-08-02  9:13           ` Tino Calancha
  -- strict thread matches above, loose matches on Subject: below --
2017-09-14  4:16 M.Nomiya
2017-09-14 12:00 ` Ken Brown
2017-09-14 12:11   ` M. Nomiya
2017-09-14 12:22     ` Ken Brown
2017-09-14 14:26       ` Paul Eggert
2017-09-14 22:12         ` M. Nomiya
2003-06-28  2:51 Vinicius Jose Latorre
2003-05-18  2:20 Vinicius Jose Latorre
2003-05-18  2:32 ` Stefan Monnier
2003-05-04 17:42 Vinicius Jose Latorre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877eyq6inh.fsf@calancha-pc \
    --to=tino.calancha@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=nomiya@galaxy.dti.ne.jp \
    --cc=rgm@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).