all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: rms@gnu.org
Cc: emacs-devel@gnu.org
Subject: Re: Interactive specs of C functions.
Date: Sun, 09 Sep 2007 16:45:45 -0400	[thread overview]
Message-ID: <jwvsl5nd10z.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <E1IU6Hh-0002aX-9R@fencepost.gnu.org> (Richard Stallman's message of "Sat\, 08 Sep 2007 15\:48\:01 -0400")

>     Indeed.  How 'bout the patch below?
>     -  if (SUBRP (fun))
>     -    {
>     -      string = (unsigned char *) XSUBR (fun)->prompt;
>     -      if (!string)
>     -	{
>     -	lose:
>     -	  wrong_type_argument (Qcommandp, function);
>     -	}

> That would be a slowdown in very important cases.

Finteractive_form takes an absolutely negligible amount of time.  So I have
no idea what you mean by "a slowdown".  The only "problem" I could imagine
is that Finteractive_form allocates a Lisp string whereas the above code
doesn't.  It's easy to work around it: make an `interactive_form' function
(used by Finteractive_form') which takes an additional char** argument into
which it can return the C string so as to avoid allocating the Lisp string
when called from Fcall_interactively.

> It would be better to keep that code, but have it fall through when it
> doesn't find an interactive string in the special way, into the
> general case.

That would prevent overriding a pre-existing interactive form.


        Stefan

  reply	other threads:[~2007-09-09 20:45 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-07 14:58 Interactive specs of C functions Michaël Cadilhac
2007-09-07 18:01 ` Stefan Monnier
2007-09-07 21:52   ` Johan Bockgård
2007-09-08  2:18     ` Stefan Monnier
2007-09-08 19:48       ` Richard Stallman
2007-09-09 20:45         ` Stefan Monnier [this message]
2007-09-10  1:13           ` Richard Stallman
2007-09-10  2:29             ` Stefan Monnier
2007-09-12 23:59               ` Johan Bockgård
2007-09-08  7:01 ` Richard Stallman
2007-09-08  9:06   ` Michaël Cadilhac
     [not found]     ` <E1IUCIK-0008Ck-2z@fencepost.gnu.org>
2007-09-09 20:46       ` Michaël Cadilhac
2007-09-09 21:19         ` Stefan Monnier
2007-09-09 22:34           ` Michaël Cadilhac
2007-09-10  1:13             ` Richard Stallman
2007-09-10 11:06               ` Michaël Cadilhac
2007-09-10 14:52                 ` Dan Nicolaescu
2007-09-10 15:05                   ` Michaël Cadilhac
2007-09-10 15:13                     ` Dan Nicolaescu
2007-09-10 15:27                       ` Michaël Cadilhac
2007-09-10 15:39                         ` Dan Nicolaescu
2007-09-10 15:55                           ` Michaël Cadilhac

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=jwvsl5nd10z.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=rms@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.