Subject: Re: bug#39291: M-: history doesn't store erroneous input

From: Stefan Monnier <[email-masked]>
Date: Thu, 30 Jan 2020 09:20:52 -0500

> Why is it a problem to move the call to unbind_to to after the call to
> add-to-history?

Because it would make `add-to-history` add to the minibuffer-local value
rather than to the callingbuffer-local value, as the comment explains:

  /* Add the value to the appropriate history list, if any.  This is
     done after the previous buffer has been made current again, in
     case the history variable is buffer-local.  */

-- Stefan