help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Strange eval behaviour


From: Michael Heerdegen
Subject: Re: Strange eval behaviour
Date: Fri, 18 Nov 2016 03:38:25 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Stefan Huchler <address@hidden> writes:

> Normaly it should through a error if it cant find a macro/function
> that is not availible right?

In case of a macro, it depends on whether the macro is defined when
compiling.  So you don't get a warning necessarily.  To avoid missing
dependencies, it's helpful to compile from a separate emacs instance
(emacs -Q).

> that was the code I did not have
> (require 'let-alist)

That was one problem, at least.

> in the file?

> Again thanks so far so I can release that code soon, but again I would
> like to understand what the problem was.

AFAIR, you had a strange handling of variables in your code: some
functions had used free variables that were declared nowhere.  Compiling
is a good way to reveal such problems.

> Do I have to have a byte-compiled .elc file if I use the "function"
> macro

No.

> oh wait its the function* which is a alias to the cl-function macro in
> cl-macs
>
> so I need the cl library imported too.

Yes.  It is now more or less consent now that the cl library should not
be loaded at run-time.  Please use cl-lib and the according cl- prefixed
functions instead.

> But well thats more relevant for packaging I think, I think the main
> problem was that there just was no .elc file?

No, Stefan suggested to compile so that you get warnings that help you
find the problems in your code.  Compiling is not required to run code.
Compiled code is just running faster, and the compiler produces
excellent warnings.


Michael.



reply via email to

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