unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Pierre Neidhardt <mail@ambrevar.xyz>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: [ELPA] New package: disk-usage
Date: Sun, 24 Feb 2019 15:24:04 -0500	[thread overview]
Message-ID: <jwvsgwd54go.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87ftsdnfq7.fsf@ambrevar.xyz> (Pierre Neidhardt's message of "Sun, 24 Feb 2019 20:33:52 +0100")

> Purcell argues that Stefan should not have used `eval-when-compile' for
> `cl-lib`:
>
> --8<---------------cut here---------------start------------->8---
> (eval-when-compile (require 'cl-lib))
> --8<---------------cut here---------------end--------------->8---
>
> because `cl-first' is used in some places.
>
> I'd tend to agree with Purcell.  Thoughts?

If you use #'cl-first then you definitely need to remove the
eval-when-compile, indeed.

But if you have direct calls to cl-first, then they will be compiled
into byte-code which do not refer to `cl-first` any more (IOW the
cl-first definition has been inlined by the compiler).
Hence your code should still work with eval-when-compile.
[ Yes: the exact conditions under which a library can be `require`d
  inside `eval-when-compile` can be pretty subtle.  ]

I used eval-when-compile because it seemed to work, but feel free to
change it, whether for technical reasons or just out of
personal preference.


        Stefan



  reply	other threads:[~2019-02-24 20:24 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-19  8:49 [ELPA] New package: disk-usage Pierre Neidhardt
2019-02-19 15:55 ` Clément Pit-Claudel
2019-02-19 16:17 ` Eli Zaretskii
2019-02-19 16:26   ` Pierre Neidhardt
2019-02-19 17:25     ` Eli Zaretskii
2019-02-19 19:29       ` Pierre Neidhardt
2019-02-19 19:44         ` Eli Zaretskii
2019-02-19 19:55           ` Pierre Neidhardt
2019-02-19 20:21 ` Michael Albinus
2019-02-19 20:26   ` Pierre Neidhardt
2019-02-19 20:39     ` Michael Albinus
2019-02-19 20:58       ` describe-mode bindings (was: [ELPA] New package: disk-usage) Stefan Monnier
2019-02-19 21:29         ` Clément Pit-Claudel
2019-02-19 21:05       ` [ELPA] New package: disk-usage Pierre Neidhardt
2019-02-20  8:08         ` Pierre Neidhardt
2019-02-20 13:28           ` Stefan Monnier
2019-02-24 17:14           ` Pierre Neidhardt
2019-02-24 19:33             ` Pierre Neidhardt
2019-02-24 20:24               ` Stefan Monnier [this message]
2019-02-26 11:59             ` Michael Albinus
2019-02-26 15:08               ` Pierre Neidhardt
2019-02-26 15:25                 ` Michael Albinus
2019-03-01 17:51                   ` Pierre Neidhardt
2019-03-01 23:28                     ` Michael Albinus
2019-03-02 13:51                       ` Pierre Neidhardt
2019-03-03 10:28                     ` Michael Albinus

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=jwvsgwd54go.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=mail@ambrevar.xyz \
    /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).