[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
loading and evaluating the buffer are not the same thing.
From: |
Nick Roberts |
Subject: |
loading and evaluating the buffer are not the same thing. |
Date: |
Mon, 16 May 2005 20:46:56 +1200 |
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.
Nick
- loading and evaluating the buffer are not the same thing.,
Nick Roberts <=