From: William Xu <william.xwl@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: Is (provide 'foo) at the start good or bad?
Date: Fri, 12 Jun 2009 18:15:55 +0300 [thread overview]
Message-ID: <21glws7hmqj8.fsf@gmail.com> (raw)
In-Reply-To: 87ljnxwxwv.fsf@uwakimon.sk.tsukuba.ac.jp
"Stephen J. Turnbull" <stephen@xemacs.org> writes:
> Provide at the bottom is an obtuse way to find out
> how much memory you have. No choice.
Well, seems elisp evaluator detects this quite early, as shown below:
,----
| Debugger entered--Lisp error: (error "Recursive `require' for feature `a'")
| require(a)
| eval-buffer(#<buffer *load*<8>> nil "q:/.emacs.d/site-lisp/b.el" nil t) ; Reading at buffer position 13
| .
| .
| eval-buffer(#<buffer *load*<2>> nil "q:/.emacs.d/site-lisp/b.el" nil t) ; Reading at buffer position 13
| load-with-code-conversion("q:/.emacs.d/site-lisp/b.el" "q:/.emacs.d/site-lisp/b.el" nil t)
| require(b)
| eval-buffer(#<buffer *load*> nil "q:/.emacs.d/site-lisp/a.el" nil t) ; Reading at buffer position 13
| load-with-code-conversion("q:/.emacs.d/site-lisp/a.el" "q:/.emacs.d/site-lisp/a.el" nil t)
| require(a)
| eval((require (quote a)))
| eval-last-sexp-1(nil)
| eval-last-sexp(nil)
| call-interactively(eval-last-sexp nil nil)
`----
So, the most reliable way would be just-in-time requires like you
explained. Providing at the top might solve some problem, it look likes
a treat. OTOH, this took me quite a while to figure out what is going
wrong.
--
William
http://xwl.appspot.com
next prev parent reply other threads:[~2009-06-12 15:15 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-11 12:56 Is (provide 'foo) at the start good or bad? William Xu
2009-06-11 17:01 ` Leo
2009-06-12 4:09 ` Stephen J. Turnbull
2009-06-12 5:01 ` William Xu
2009-06-12 10:02 ` Thien-Thi Nguyen
2009-06-12 10:26 ` Stephen J. Turnbull
2009-06-12 15:15 ` William Xu [this message]
2009-06-12 8:36 ` Alan Mackenzie
2009-06-12 10:10 ` Stephen J. Turnbull
2009-06-12 23:00 ` Davis Herring
2009-06-13 12:19 ` Stephen J. Turnbull
2009-06-14 19:30 ` Davis Herring
2009-06-15 3:04 ` Stephen J. Turnbull
2009-06-15 18:20 ` Davis Herring
2009-06-16 3:47 ` Stephen J. Turnbull
2009-06-12 21:16 ` Stefan Monnier
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=21glws7hmqj8.fsf@gmail.com \
--to=william.xwl@gmail.com \
--cc=emacs-devel@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).