Subject: bug#23264: 25.0.90; `C-h f' (`describe-function'): "This function has a compiler macro"

From: Lars Ingebrigtsen <[email-masked]>
Date: Fri, 13 May 2022 17:59:13 +0200

Stefan Monnier <[email-masked]> writes:

> 1- If it includes a link to the compiler macro.  Admittedly, compiler
>    macros are supposed to be placed directly inside the `declare` of the
>    function, so you can get there via the usual link to the function's
>    definition, which makes this link's usefulness rather marginal.
>    (except in theory for those rare exceptions where the compiler macro
>    is not provided via `declare`, but to be honest, I can't think of any
>    and `grep` couldn't find any either).

There's this:

(put 'featurep 'compiler-macro
     (lambda (form feature &rest _ignore)
       ;; Emacs-21's byte-code doesn't run under XEmacs or SXEmacs anyway, so
       ;; we can safely optimize away this test.
       (if (member feature '('xemacs 'sxemacs 'emacs))
           (eval form)
         form)))

But that's not a symbol, so Emacs won't offer up a button for it.  But
it is indeed extremely rare.

> 2- It warns that advice and (more generally) redefinitions of this
>    function may not be obeys at all call sites.

Hm, yes, that can be handy to know.

> Point 1 is quite weak.
> Point 2 is a bit more interesting but then we should say so more
> explicitly and (more importantly) we should also say so for those
> functions which have the same property but for other reasons (e.g. they
> have their own byte-code, or they have a `byte-compile` or
> `byte-optimizer` property).
>
> IOW, I agree but maybe it would be a good idea to replace it with
> a better message that covers this and similar cases warning about
> applicability of `advice`.

Do you have any suggested text?  🙃

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no