[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Dynamic loading progress; funcall of goto-char fails
From: |
Stephen Leake |
Subject: |
Re: Dynamic loading progress; funcall of goto-char fails |
Date: |
Tue, 05 May 2015 23:11:10 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (windows-nt) |
Stephen Leake <address@hidden> writes:
> Aurélien Aptel <address@hidden> writes:
>
>> I've tried to implement modules using Daniel's plan. It turned out to
>> be pretty easy, mostly because I'm more familiar with the Emacs
>> codebase now and because it's a lot less intrusive than my previous
>> attempt.
>>
>> It's not finished but I have a basic module working on linux. It's a
>> proof of concept, basically.
>
> I've implemented a test module that calls two Ada mode parser actions
> (see below).
>
> The real module will call the actual parser and build the action args
> from the parse results.
>
> I did not have to modify anything in the Emacs C code to make this work,
> so it shows this module design is adquate for my use case so far.
I've made more progress; I've got a module that should run the full Ada
parser on a buffer.
However, when I run it, it crashes on a call like:
emacs_value goto_char_sym = env.intern (env, "goto-char");
env.funcall (env, goto_char_sym, env.make_fixnum (env, 1));
When I trace the 'funcall' (in eval.c DEFUN funcall), it hits this code:
fun = original_fun;
if (SYMBOLP (fun) && !NILP (fun)
&& (fun = XSYMBOL (fun)->function, SYMBOLP (fun)))
fun = indirect_function (fun);
and sets fun to 0, which then signals a failure.
Is this because 'goto-char' is implemented in C?
If so, I need a way to call elisp functions implemented in C.
Hmm. I guess for now I can provide elisp wrappers for all the functions
I need.
--
-- Stephe
- Re: Dynamic loading progress; funcall of goto-char fails,
Stephen Leake <=