unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Roland Winkler" <winkler@gnu.org>
Cc: 43678@debbugs.gnu.org
Subject: bug#43678: 27.1; compiler warning if code forgets to require cl-lib
Date: Mon, 28 Sep 2020 16:04:54 -0400	[thread overview]
Message-ID: <jwv4knhznuz.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <14966.43123.284262.24434@gargle.gargle.HOWL> (Roland Winkler's message of "Mon, 28 Sep 2020 21:33:10 +0200")

> In bbdb-tex:
> bbdb-tex.el:415:25:Error: Forgot to expand macro cl-progv in (cl-progv ...

Oh, yes, now I can reproduce it as well (I was using an older version
of BBDB before).  And indeed, I had misunderstood the error, this one is
a different one from the one I was thinking of.

This error is because `cl-progv` was not known to the compiler when we
started compiling the `bbdb-tex` function, but during the course of its
compilation, something somewhere caused `cl-lib` to be loaded such that
by the time the byte-compiler gets to look again at (cl-progv ...), it
now notices that it's a macro, which should not be possible because we
should have performed all the macro-expansion at the very
beginning already.

Hmmm... indeed it's clearly not a very helpful message since it even
misled its original author.  I think when I wrote it I assumed it would
only occur because of an internal bug, but clearly it can occur in
other cases.

I'm not sure what would be a good error message.
Maybe something like "`cl-progv` defined too late"?


        Stefan






  reply	other threads:[~2020-09-28 20:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-28 18:11 bug#43678: 27.1; compiler warning if code forgets to require cl-lib Roland Winkler
2020-09-28 19:19 ` Stefan Monnier
2020-09-28 19:33   ` Roland Winkler
2020-09-28 20:04     ` Stefan Monnier [this message]
2020-09-28 20:31       ` Roland Winkler
2020-09-28 20:42         ` Stefan Monnier
2020-09-28 21:06           ` Roland Winkler
2020-09-29 14:53       ` Lars Ingebrigtsen
2020-09-30  5:10         ` Howard Melman
2020-09-30 14:12           ` Lars Ingebrigtsen

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=jwv4knhznuz.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=43678@debbugs.gnu.org \
    --cc=winkler@gnu.org \
    /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).