Subject: Re: bug#27584: 26.0.50; alist-get: Add optional arg TESTFN

From: Stefan Monnier <[email-masked]>
Date: Fri, 07 Jul 2017 11:53:58 -0400

> +  (declare (compiler-macro
> +            (lambda (_)
> +              `(pcase ,pred
> +                 ('eq (assq ,key ,alist))
> +                 ((or 'equal 'nil) (assoc ,key ,alist))
> +                 ((guard (and (macroexp-const-p ,key) (eq ,pred 'eql)))
> +                  (if (floatp ,key)
> +                      (assoc ,key ,alist) (assq ,key ,alist)))
> +                 (_ (assoc-default ,key ,alist ,pred nil 'full))))))

This replaces a call to the function with a chunk of code which does
`pcase`, which is not what we want: we want the `pcase` to be executed
during compilation and if we can't choose which branch to follow, then
we just keep the call unchanged (which is why, in my define-inline
example, the pcase was outside of `inline-quote`).

        Stefan