[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Changing a cl-defstruct definition in a published package
From: |
Stefan Monnier |
Subject: |
Re: Changing a cl-defstruct definition in a published package |
Date: |
Thu, 19 Jul 2018 17:10:45 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> (message
> (eval-when-compile
> (if (bound-and-true-p byte-compile-current-file)
> "I'm being byte-compiled!"
> "I'm being evaluated :(")))
Let's say, this is in a file foo.el. And let's say we have a file
bar.el which contains:
(require 'foo)
...
Then byte-compiling bar.el (when foo.el has not been byte-compiled)
will emit a message "I'm being byte-compiled!".
But yes, there are other ways. I think I remember using something like
(setq my-witness t)
(eval-when-compile
(message (if (bound-and-true-p my-witness)
"Loading this file non-compiled"
"Byte-compiling this file")))
(setq my-witness nil)
in the past,
Stefan
- Re: Changing a cl-defstruct definition in a published package, (continued)
- Re: Changing a cl-defstruct definition in a published package, João Távora, 2018/07/13
- Re: Changing a cl-defstruct definition in a published package, Clément Pit-Claudel, 2018/07/13
- Re: Changing a cl-defstruct definition in a published package, Stefan Monnier, 2018/07/13
- Re: Changing a cl-defstruct definition in a published package, Clément Pit-Claudel, 2018/07/13
- Re: Changing a cl-defstruct definition in a published package, Stefan Monnier, 2018/07/13
- Re: Changing a cl-defstruct definition in a published package, Clément Pit-Claudel, 2018/07/15
- Re: Changing a cl-defstruct definition in a published package, Stefan Monnier, 2018/07/15
- Re: Changing a cl-defstruct definition in a published package, Clément Pit-Claudel, 2018/07/15
- Re: Changing a cl-defstruct definition in a published package, Stefan Monnier, 2018/07/15
Re: Changing a cl-defstruct definition in a published package, Jake, 2018/07/19
- Re: Changing a cl-defstruct definition in a published package,
Stefan Monnier <=