all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: 36392@debbugs.gnu.org
Subject: bug#36392: (info "(elisp)Writing Emacs Primitives") might need some clarifications
Date: Wed, 26 Jun 2019 13:31:06 +0200	[thread overview]
Message-ID: <CADwFkmnowT8izEov-50qXrbhgxyULA_Tgu649CTGEFmp8qt_Sw@mail.gmail.com> (raw)

As a beginner on Emacs Internals, I've been reading:

(info "(elisp)Writing Emacs Primitives")

I hope that you find the following observations useful:

1.  "If the primitive accepts a fixed maximum number of Lisp
    arguments, there must be one C argument for each Lisp argument,
    and each argument must be of type ‘Lisp_Object’.  ...  If the
    primitive has no upper limit on the number of Lisp arguments, it
    must have exactly two C arguments: the first is the number of Lisp
    arguments, and the second is the address of a block containing
    their values."

The example given is DEFUN( "or", ...)

This function has no upper limit on the number of Lisp arguments, but
still has only ONE argument.  Unless I'm missing something, this
contradicts the statement above that "it must have exactly TWO C
arguments" (my emphasis).

2.  "Although the garbage collector does not reclaim objects reachable
    from C ‘Lisp_Object’ stack variables, it may move non-object
    components of an object, such as string contents; so functions
    that access non-object components must take care to refetch their
    addresses after performing Lisp evaluation."

I don't think this is very clear.  What is non-object components?  How
would I refetch their addresses?  How is this relevant to the topic at
hand?

I suggest that the above two points are clarified in the manual
somehow.

Thanks,
Stefan Kangas





             reply	other threads:[~2019-06-26 11:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-26 11:31 Stefan Kangas [this message]
2019-06-26 13:09 ` bug#36392: (info "(elisp)Writing Emacs Primitives") might need some clarifications Basil L. Contovounesios
2019-06-26 15:14   ` Eli Zaretskii
2019-06-26 18:20     ` Basil L. Contovounesios
2019-06-26 18:34       ` Eli Zaretskii
2019-06-26 21:29         ` Basil L. Contovounesios
2019-06-27  1:01           ` Stefan Kangas

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADwFkmnowT8izEov-50qXrbhgxyULA_Tgu649CTGEFmp8qt_Sw@mail.gmail.com \
    --to=stefan@marxist.se \
    --cc=36392@debbugs.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.