unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Philipp Stephani <p.stephani2@gmail.com>
Cc: phst@google.com, emacs-devel@gnu.org
Subject: Re: [PATCH] Reimplement module functions
Date: Sat, 13 May 2017 20:05:17 +0300	[thread overview]
Message-ID: <83fug88z76.fsf@gnu.org> (raw)
In-Reply-To: <20170513144408.14057-1-phst@google.com> (message from Philipp Stephani on Sat, 13 May 2017 16:44:08 +0200)

> From: Philipp Stephani <p.stephani2@gmail.com>
> Date: Sat, 13 May 2017 16:44:08 +0200
> Cc: Philipp Stephani <phst@google.com>
> 
> Instead of a lambda, create a new type containing all data required to
> call the function, and support it in the evaluator.  Because this type
> now also needs to store the function documentation, it is too big for
> Lisp_Misc; use a pseudovector instead.  That also has the nice benefit
> that we don't have to add special support to the garbage collector.

Thanks.

> +#ifdef HAVE_MODULES
> +  else if (MODULE_FUNCTIONP (fun))
> +    doc = XMODULE_FUNCTION (fun)->documentation;
> +#endif

I wonder whether it would be cleaner to have MODULE_FUNCTIONP defined
even when HAVE_MODULES is not: it looks like it could save us quite a
few #ifdef's.

> -DEFUN ("internal--module-call", Finternal_module_call, Sinternal_module_call, 1, MANY, 0,
> -       doc: /* Internal function to call a module function.
> -ENVOBJ is a save pointer to a module_fun_env structure.
> -ARGLIST is a list of arguments passed to SUBRPTR.
> -usage: (module-call ENVOBJ &rest ARGLIST)   */)
> -  (ptrdiff_t nargs, Lisp_Object *arglist)
> +Lisp_Object
> +funcall_module (const struct Lisp_Module_Function *const envptr,
> +                ptrdiff_t nargs, Lisp_Object *arglist)
>  {

I don't think we can simply remove a function that was already present
in one or more Emacs releases.  We need to provide a backward
compatibility layer, and definitely also mention this in NEWS.



  reply	other threads:[~2017-05-13 17:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-13 14:44 [PATCH] Reimplement module functions Philipp Stephani
2017-05-13 17:05 ` Eli Zaretskii [this message]
2017-05-14  3:07   ` Noam Postavsky
2017-05-14 14:11     ` Eli Zaretskii
2017-05-14 11:40   ` Aurélien Aptel
2017-05-14 14:30     ` Eli Zaretskii
2017-05-14 18:08   ` Philipp Stephani
2017-05-14 18:09     ` Philipp Stephani
2017-05-20 13:37       ` Philipp Stephani
2017-05-20 20:46         ` Paul Eggert
2017-05-21 20:20           ` Philipp Stephani

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=83fug88z76.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=p.stephani2@gmail.com \
    --cc=phst@google.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).