[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is (provide 'foo) at the start good or bad?
From: |
William Xu |
Subject: |
Re: Is (provide 'foo) at the start good or bad? |
Date: |
Fri, 12 Jun 2009 18:15:55 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (windows-nt) |
"Stephen J. Turnbull" <address@hidden> 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
- Is (provide 'foo) at the start good or bad?, William Xu, 2009/06/11
- Re: Is (provide 'foo) at the start good or bad?, Alan Mackenzie, 2009/06/12
- Re: Is (provide 'foo) at the start good or bad?, Stephen J. Turnbull, 2009/06/12
- Re: Is (provide 'foo) at the start good or bad?, Davis Herring, 2009/06/12
- Re: Is (provide 'foo) at the start good or bad?, Stephen J. Turnbull, 2009/06/13
- Re: Is (provide 'foo) at the start good or bad?, Davis Herring, 2009/06/14
- Re: Is (provide 'foo) at the start good or bad?, Stephen J. Turnbull, 2009/06/14
- Re: Is (provide 'foo) at the start good or bad?, Davis Herring, 2009/06/15
- Re: Is (provide 'foo) at the start good or bad?, Stephen J. Turnbull, 2009/06/15
Re: Is (provide 'foo) at the start good or bad?, Stefan Monnier, 2009/06/12