Subject: Re: bug#67483: Wrong warning position given by the byte compiler for a malformed function

From: Stefan Monnier <[email-masked]>
Date: Mon, 04 Dec 2023 11:44:44 -0500

>     (defun foo ()
>       (let ((bar 'bar))
>         (if ("foo")  ; Erroneous "function".
>             (baz))))))
>
> ..  Use M-x compile-defun to compile it.  This gives an error message:
>
>     Buffer bad-error-position.el:2:4: Warning: `foo' is a malformed function
>
> ..  This position 2:4 is wrong; it is the position of the `let' symbol.
> The correct position would be 3:6, the position of the `if' symbol.

Also the message should use `"foo"` rather than `foo` (IOW,
the `%s` should be a `%S`).  As a general rule of thumb, `%s` should be
used *only* when displaying the content of a string, and `%S` should be
used for most/all other cases (e.g. when displaying what we expect is
a symbol, like here).

        Stefan