all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: &optional arguments in defuns stopped working
@ 2004-03-29  8:44 David PONCE
  2004-03-29 12:49 ` Kim F. Storm
  2004-03-29 14:01 ` Stefan Monnier
  0 siblings, 2 replies; 3+ messages in thread
From: David PONCE @ 2004-03-29  8:44 UTC (permalink / raw)
  Cc: emacs-pretest-bug, emacs-devel

Hi,

> I use the latest cvs emacs. When I define a function like this:
> 
> (defun test-o (&optional arg)
>   (interactive "P")
>   (message "arg: %S" arg))
> 
> 
> M-x test-o yields:
> Debugger entered--Lisp error: (void-function &optional)
>   (&optional arg)
> * call-interactively(test-o)
>   execute-extended-command(nil)
>   call-interactively(execute-extended-command)
> 
> There seems to be something wrong with the lisp parser...

It seems that the problem is due to this change made into callint.c:

2004-03-28  Stefan Monnier  <monnier@iro.umontreal.ca>

	* eval.c (Fcommandp): Simplify.

	* data.c (Finteractive_form): Rename from Fsubr_interactive_form.
	Extend to handle all kinds of functions.

	* lisp.h (Finteractive_form): Declare.

	* callint.c (Fcall_interactively): Use it.

It looks that the lisp object 'form' is not initialized in callint.c.
After I applied the following small patch the problem disappeared.

Sincerely,
David

Index: src/callint.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/callint.c,v
retrieving revision 1.129
diff -c -r1.129 callint.c
*** src/callint.c	29 Mar 2004 00:49:00 -0000	1.129
--- src/callint.c	29 Mar 2004 08:37:16 -0000
***************
*** 351,357 ****
      {
        Lisp_Object form;
        GCPRO2 (function, prefix_arg);
!       Finteractive_form (function);
        UNGCPRO;
        if (CONSP (form))
  	specs = filter_specs = Fcar (XCDR (form));
--- 351,357 ----
      {
        Lisp_Object form;
        GCPRO2 (function, prefix_arg);
!       form = Finteractive_form (function);
        UNGCPRO;
        if (CONSP (form))
  	specs = filter_specs = Fcar (XCDR (form));

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: &optional arguments in defuns stopped working
  2004-03-29  8:44 &optional arguments in defuns stopped working David PONCE
@ 2004-03-29 12:49 ` Kim F. Storm
  2004-03-29 14:01 ` Stefan Monnier
  1 sibling, 0 replies; 3+ messages in thread
From: Kim F. Storm @ 2004-03-29 12:49 UTC (permalink / raw)
  Cc: emacs-pretest-bug, xsteve, emacs-devel

David PONCE <david.ponce@wanadoo.fr> writes:

> It looks that the lisp object 'form' is not initialized in callint.c.
> After I applied the following small patch the problem disappeared.

Installed.  Thanks.

-- 
Kim F. Storm  http://www.cua.dk

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: &optional arguments in defuns stopped working
  2004-03-29  8:44 &optional arguments in defuns stopped working David PONCE
  2004-03-29 12:49 ` Kim F. Storm
@ 2004-03-29 14:01 ` Stefan Monnier
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2004-03-29 14:01 UTC (permalink / raw)
  Cc: emacs-pretest-bug, xsteve, emacs-devel

> !       form = Finteractive_form (function);

Duh!


        Stefan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-03-29 14:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-29  8:44 &optional arguments in defuns stopped working David PONCE
2004-03-29 12:49 ` Kim F. Storm
2004-03-29 14:01 ` Stefan Monnier

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.