emacs-devel
[Top][All Lists]
Advanced

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

Re: How to cause a compiler warning?


From: João Távora
Subject: Re: How to cause a compiler warning?
Date: Thu, 18 Jan 2024 12:26:53 +0000

On Thu, Jan 18, 2024 at 12:05 PM Alan Mackenzie <acm@muc.de> wrote:

> > Call it FORM.  Then add in the text you wrote to Richard, who
> > seem to have also been confused.
>
> FORM is unsuitable, because in the byte compiler it always means the
> form currently being compiled.

FORM is the nomenclature given to Lisp objects that represent
symbolic expressions: it's not an exclusive of the byte compiler.
Appears in very many numerous places in our Emacs,
just grep for it.

> What do you mean, "you'll see the macro invocation itself highlighted"?
> You certainly won't in a batch compilation, and I don't recall seeing
> anything highlighted anywhere for a compilation from within a running
> Emacs.  In which window would this highlighting appear?

Turn on M-x flymake-mode in an Elisp buffer and introduce a mistake
(be careful though, it compiles as you type, and that runs code).

> You haven't identified a concrete case where byte-compile-warn-x would
> be inappropriate, or difficult to use.

I have, of course. Sometimes there's no form to give it, or you don't
want to choose a particular one form to hook the warning on to.

Passing nil is fine, I guess, but a bit awkward.  If you ask me,
byte-compile-warn should have been kept and an additional
optional arg added.  Even a keyword arg! Oh noes!

Anyway, I don't have much more to add.
João



reply via email to

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