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

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

Re: [modules] Possible return values of the env->type_of?


From: Kaushal Modi
Subject: Re: [modules] Possible return values of the env->type_of?
Date: Fri, 22 Jun 2018 13:52:44 -0400

Hello Aurélie,

On Fri, Jun 22, 2018 at 1:38 PM Aurélien Aptel <aurelien.aptel@gmail.com>
wrote:

>
> That's because lists are cons: (list 1 2 3) and (cons 1 (cons 2 (cons
> 3 nil))) eval to the same thing.
>

Yes. Thank you. I realized that after I looked at C-h f type-of:

> Return a symbol representing the type of OBJECT.
> The symbol returned names the object’s basic type;

So the "basic" is the key :)


> Perhaps you'll find Philip's doc useful:
> https://phst.github.io/emacs-modules#type_of
>

Yes! That's where I figured out the relationship between env->type_of and
type-of.

@Philipp Can that documentation be made part of the Emacs Manual? It's
really useful for folks like me who don't know C. In your doc, you say:

> Because the module API is a C API, you have to be familiar with C to
write Emacs modules.

But that doesn't seem to be the case for me :) Nim provides enough
abstraction to use this API and make the code readable just like Python.
This is what I am working on[1].

[1]:
https://github.com/kaushalmodi/nim-emacs-module/blob/test-whole-emacs-module/test/modtest.nim
-- 

Kaushal Modi


reply via email to

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