Subject: bug#38317: Buffer-local variables don't work as history for read-from-minibuffer

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 27 Nov 2019 12:53:23 +0100

Federico Tedin <[email-masked]> writes:

> I've tested the following commands with it, using `read-from-minibuffer'
> with a buffer-local HIST:
>
> - previous-history-element (M-p)
> - next-history-element (M-n)
> - previous-matching-history-element (M-r)
> - next-matching-history-element (M-s)
> - isearch-forward (C-s)
> - isearch-backward (C-r)
>
> They've all worked correctly and used only the buffer's local history
> value.

I haven't tested the code, but it makes sense to me.  I do wonder
whether there are any instances of the variables that are local to the
minibuffer...  but I guess that's unlikely?

> +** 'read-from-minibuffer' now works with buffer-local history variables
> +The HIST argument of 'read-from-minibuffer' now works correctly with
> +buffer-local variables. This means that different buffers can have
> +their own separated input history list if desired.

This should probably be documented in the manual, too?

The patch otherwise looks good to me.

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