bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#4427: 23.1; defun* don't work when compiled.


From: Thierry Volpiatto
Subject: bug#4427: 23.1; defun* don't work when compiled.
Date: Wed, 10 Mar 2010 21:50:01 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.93 (gnu/linux)

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 <address@hidden> 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/






reply via email to

[Prev in Thread] Current Thread [Next in Thread]