From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: 4427@emacsbugs.donarmstrong.com
Subject: bug#4427: 23.1; defun* don't work when compiled.
Date: Wed, 10 Mar 2010 21:50:01 +0100 [thread overview]
Message-ID: <87mxyfewau.fsf@tux.homenetwork> (raw)
In-Reply-To: <87fxajolh2.fsf@stupidchicken.com> (Chong Yidong's message of "Fri, 18 Sep 2009 19:56:57 -0400")
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@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/
next prev parent reply other threads:[~2010-03-10 20:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-18 23:56 bug#4427: 23.1; defun* don't work when compiled Chong Yidong
2010-03-10 20:50 ` Thierry Volpiatto [this message]
2009-09-14 10:24 ` Thierry Volpiatto
2009-09-14 12:29 ` Thierry Volpiatto
2010-03-12 3:19 ` Glenn Morris
2010-03-12 7:07 ` Thierry Volpiatto
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=87mxyfewau.fsf@tux.homenetwork \
--to=thierry.volpiatto@gmail.com \
--cc=4427@emacsbugs.donarmstrong.com \
--cc=cyd@stupidchicken.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).