Subject: bug#20144: 25.0.50; Functions using fboundp not known to be defined

From: Stefan Monnier <[email-masked]>
Date: Thu, 19 Mar 2015 15:27:45 -0400

severity 20144 wishlist
thanks

> (if (fboundp 'car)
>     (defalias 'mycar 'car)
>   (defun mycar (_l) (error "what")))

   (defalias 'mycar
             (if (fboundp 'car) 'car (lambda (_l) (error "what"))))

The difference is one of the two versions requires reasoning
(simple/trivial for you, but beyond the reach of the simple
byte-compiler we're using), whereas the other doesn't.

Admittedly, when you need to define two versions of a *set* of
functions, depending on a single test, the above trick of sinking the
testing into the `defalias' ends up being a bit ugly/inconvenient.

        Stefan