From: Kaushal Modi <kaushal.modi@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: Oddities with dynamic modules
Date: Fri, 12 Oct 2018 10:29:17 -0400 [thread overview]
Message-ID: <CAFyQvY0Cuv2M7hLy0-iiZECCg4BFwFGJ3n=py+fOcw6To39GBQ@mail.gmail.com> (raw)
In-Reply-To: <83y3b4wdw9.fsf@gnu.org>
On Thu, Oct 11, 2018 at 2:14 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> Having written the documentation of the module API,
Thanks for writing up all that documentation!
https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-26&id=ce8b4584a3c69e5c4abad8a0a9c3781ce8c0c1f8
I am not in the capacity to comment on most of your questions as I am
using the Modules feature to get around my lack of C knowledge :)
> . Why aren't there API functions to _create_ lists and vectors?
>
> . Using 'funcall' is unnecessarily cumbersome, because the function
> to be called is passed as an 'emacs_value'. Why don't we have a
> variant that just accepts a name of a Lisp-callable function as a C
> string?
+1
I needed to create some sugar syntax in Nim (which compiles to C) to
get around that limitation:
proc MakeList*(env: ptr emacs_env; listArray: openArray[emacs_value]):
emacs_value =
## Return an Emacs-Lisp ``list``.
Funcall(env, "list", listArray)
proc MakeCons*(env: ptr emacs_env; consCar, consCdr: emacs_value): emacs_value =
## Return an Emacs-Lisp ``cons``.
Funcall(env, "cons", [consCar, consCdr])
It would be nice to have API for list (and cons).
> . Why does 'intern' only handle pure ASCII symbol names? It's not
> like supporting non-ASCII names is hard.
>
> . I could understand why equality predicates are not provided in the
> API, but I don't understand why we do provide 'eq' there. Is it
> that much more important than the other predicates?
I had the same question too. I find equal more useful than eq.
next prev parent reply other threads:[~2018-10-12 14:29 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-11 18:12 Oddities with dynamic modules Eli Zaretskii
2018-10-12 14:29 ` Kaushal Modi [this message]
2019-02-10 20:23 ` Philipp Stephani
2019-02-11 15:45 ` Eli Zaretskii
2019-02-11 16:04 ` Yuri Khan
2019-03-21 20:04 ` Philipp Stephani
2019-03-21 20:17 ` Eli Zaretskii
2019-03-21 20:32 ` Philipp Stephani
2019-03-21 20:46 ` Eli Zaretskii
2019-03-21 20:51 ` Philipp Stephani
2019-03-21 20:12 ` Philipp Stephani
2019-03-21 20:25 ` Eli Zaretskii
2019-03-21 20:34 ` Philipp Stephani
2019-03-21 20:51 ` Eli Zaretskii
2019-03-21 20:58 ` Philipp Stephani
2019-03-22 1:26 ` creating unibyte strings (was: Oddities with dynamic modules) Stefan Monnier
2019-03-22 7:41 ` Eli Zaretskii
2019-03-22 12:33 ` creating unibyte strings Stefan Monnier
2019-03-22 13:27 ` Eli Zaretskii
2019-03-22 14:23 ` Stefan Monnier
2019-03-22 15:11 ` Eli Zaretskii
2019-03-22 15:37 ` Stefan Monnier
2019-03-22 15:54 ` Eli Zaretskii
2019-03-24 14:51 ` Elias Mårtenson
2019-03-24 17:10 ` Eli Zaretskii
2019-03-25 1:47 ` Elias Mårtenson
2019-03-25 3:41 ` Eli Zaretskii
2019-03-26 10:23 ` Elias Mårtenson
2019-03-26 11:12 ` Stefan Monnier
2019-03-22 8:20 ` Oddities with dynamic modules Eli Zaretskii
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='CAFyQvY0Cuv2M7hLy0-iiZECCg4BFwFGJ3n=py+fOcw6To39GBQ@mail.gmail.com' \
--to=kaushal.modi@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/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).