Subject: bug#27016: possible bug in `defsetf'

From: [email-masked]
Date: Tue, 11 Jul 2017 20:55:51 -0400

Stefan Monnier <[email-masked]> writes:

> I think a better avenue would be to change function-put and function-get
> to DTRT.

I can see how that might work for function-get:

    (defun function-get (f prop &optional autoload)
      ...
   +  (or
   +   (if (eq prop 'gv-expander)
   +       (alist-get f (alist-get :gv-expanders
   +                               (bound-and-true-p
   +                                byte-compile-macro-environment))))
       (let ((val nil))
         (while (and (symbolp f)
                     (null (setq val (get f prop)))
         ;; etc...

But how can I make function-put do the right thing for both a macro
calling it and keep it's normal role?