From: "Elias Mårtenson" <lokedhs@gmail.com>
To: Joakim Jalap <joakim.jalap@fastmail.com>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: GNUS Kerberos support, native GSSAPI?
Date: Thu, 9 Feb 2017 21:02:11 +0800 [thread overview]
Message-ID: <CADtN0W+NMC_65Mw+UYZRW+Z=i9nHuZKTJ5wCGp8TSGig4MTH7Q@mail.gmail.com> (raw)
In-Reply-To: <87a89vmvd5.fsf@fastmail.com>
[-- Attachment #1: Type: text/plain, Size: 1294 bytes --]
On 9 February 2017 at 19:55, Joakim Jalap <joakim.jalap@fastmail.com> wrote:
This is really cool :) Just looking over the code quickly it seems like
> it would be useful to extract some of the functions in your module as a
> sort of "emacs module lib". I mean things like bind_function, xcar,
> xcdr, lisp_push (which is cons) and so on. Shouldn't everybody who
> writes a module want most of these?
>
> Just a thought :)
>
Thanks! And yes, I agree. This is my first attempt at writing something
that uses the module API, and these are definitely functions that I cannot
see anyone writing a module would not end up reimplementing.
In fact, I'd go as far as suggesting that some of the boilerplate should be
provided by emacs-module itself. In particular, having to do
env->intern(env, "nil") just to get a reference to nil is a bit crazy.
I tried putting all the interned symbols in a struct and passing specifying
it as a data pointer when constructing the functions. However, this did not
work as the emacs_value objects does not seem to have a lifetime outside of
the invocation of a native function. I haven't seen this documented
anywhere, so that was a bit surprising at first. The fact that this failed
is the reason you see all the calls to env->intern everywhere.
Regards,
Elias
[-- Attachment #2: Type: text/html, Size: 1785 bytes --]
next prev parent reply other threads:[~2017-02-09 13:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-06 10:03 GNUS Kerberos support, native GSSAPI? Elias Mårtenson
2017-02-06 14:22 ` Stefan Monnier
2017-02-07 3:14 ` Elias Mårtenson
2017-02-07 14:16 ` Stefan Monnier
2017-02-09 4:45 ` Elias Mårtenson
2017-02-09 11:55 ` Joakim Jalap
2017-02-09 13:02 ` Elias Mårtenson [this message]
2017-02-10 18:21 ` Aurélien Aptel
2017-04-23 17:31 ` Philipp Stephani
2017-04-24 10:53 ` Elias Mårtenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADtN0W+NMC_65Mw+UYZRW+Z=i9nHuZKTJ5wCGp8TSGig4MTH7Q@mail.gmail.com' \
--to=lokedhs@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=joakim.jalap@fastmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).