emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: loading and evaluating the buffer are not the same thing.


From: Lute Kamstra
Subject: Re: loading and evaluating the buffer are not the same thing.
Date: Tue, 17 May 2005 23:27:46 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Nick Roberts <address@hidden> writes:

> In the Lisp manual, it says:
>
>> The load functions evaluate all the expressions in a file just as
>> the `eval-current-buffer' function evaluates all the expressions in a
>> buffer. The difference is that the load functions read and evaluate
>> the text in the file as found on disk, not the text in an Emacs buffer.
>
> gud.el has the line:
>
> (eval-when-compile (require 'cl))
>
> If I do load-library <RET> gud <RET>
>
> then gud is loaded and cl is not, as you would expect.
>
> However, if I put gud.el in a buffer and do eval-buffer, cl *is* loaded.
> Even if I just evaluate the above expression cl is loaded.
>
> This seems wrong and the doc string for eval-when-compile doesn't suggest
> otherwise. If it is right, it would be helpful to explain the difference
> between load and eval in the manual.

"load-library <RET> gud <RET>" loads "gud.elc" (if present), not
"gud.el".

Lute.




reply via email to

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