[Top][All Lists]

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

Re: Does not byte-compile return the compiled function in Emacs 24?

From: Lennart Borgman
Subject: Re: Does not byte-compile return the compiled function in Emacs 24?
Date: Wed, 7 Dec 2011 17:34:02 +0100

On Wed, Dec 7, 2011 at 16:12, Stefan Monnier <address@hidden> wrote:
>>>> It used to do that before. Is there any variable holding the newly
>>>> byte-compiled function?
>>> Don't know.  `byte-compile' does various things in various circumstances
>>> (it's pretty DWIMish), so without more details I can't help you.
>> In mumamo.el I am building functions for fontification. I compile them
>> like this:
>>         (setq byte-compiled-fun (let ((major-syntax-table))
>>                                   (byte-compile fetch-func-definition)))
> This just tells me you call the function with some value and the get
> the result.  I.e. not much more information.
> The key is to know what kind of value is passed to byte-compile: is it
> a symbol, an arbitrary Lisp expression, a lambda expression, ...

It is a lisp expression, but a big one. I am building a function to
call before fontification. This function let binds relevant variables
for the fontification.

When testing a bit more I see that (byte-compile (lambda ...)) returns
the function when everything goes ok, but not when there is an error.
For the function for php-mode fontification I get an error during byte

  Error: Wrong type argument: number-or-marker-p, nil

So it looks like byte-compile dislikes something in the (lambda ...)
for php-mode fontification. I just wished I knew what it is... ;-)

Perhaps someone has an idea of how to catch it? I build the let-list
with entries like

      (list 'font-lock-syntactic-face-function (custom-quote

Could this go wrong for some values?

reply via email to

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