GNU bug report logs - #4427
23.1; defun* don't work when compiled.

Previous Next

Package: emacs;

Reported by: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>

Date: Mon, 14 Sep 2009 10:40:06 UTC

Severity: normal

Tags: moreinfo

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 4427 <at> debbugs.gnu.org
Subject: bug#4427: 23.1; defun* don't work when compiled.
Date: Wed, 10 Mar 2010 21:50:01 +0100
Hi, sorry for very late reply, but i couldn't make a small recipe
reproducing that, however that lead to another bug with defsubst*.

Here a file foo.el that contain this very useful code:

(eval-when-compile (require 'cl))
(defsubst* compare-a-b (a b &key (test 'eq))
  (funcall test a b))

1) save the file

2) Go in emacs -Q

3) load the file (foo.el)
 
,----
| Loading /home/thierry/tmp/foo.el (source)...
| Load error for /home/thierry/tmp/foo.el:
| (void-function defsubst*)
`----

That is the same if you (require 'cl) instead of (eval-when-compile...)

Now compile (always in emacs -Q) the file and load it (foo.elc)

That work as expected.


Chong Yidong <cyd <at> stupidchicken.com> writes:

>> In traverselisp.el, i use cl stuff with
>> (eval-when-compile (require 'cl)) at start of file.
>> I have functions that are like:
>> (defun* foo (&key a b)...
>>
>> They all work fine after compiling file.
>>
>> However, i have one new function that don't work when compiling file but
>> work as normal when loading the .el file, or evaluate the function with
>> C-M x.
>
> Could you try to make a small, self-contained test case?  Your example
> is not small, and it is not self-contained (it calls
> traverse-find-readlines).  This makes it difficult to debug.
>

-- 
Thierry Volpiatto
Gpg key: http://pgp.mit.edu/




This bug report was last modified 15 years and 136 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.