Subject: Re: bug#23781: 25.0.95; read-string with HIST lexically bound

From: Michael Heerdegen <[email-masked]>
Date: Fri, 17 Jun 2016 17:25:04 +0200

Tino Calancha <[email-masked]> writes:

> (defun my-test-lexical ()
>   "Test of lexical-binding."
>   (interactive)
>   (let ((values '("a" "b" "c")))
>     (read-string "lexical: " (car values) '(values . 1))))
>
> [...]
> II.3) (Different)
> M-x my-test-lexical RET
> ;; minibuffer shows: lexical: a
> M-p
> ;; user-error: Beginning of history; no preceding item

AFAICT this is expected and not specific to `read-string': A quoted
symbol can never refer to a lexical binding - and `symbol-value' or
`eval' always return the dynamic binding.

Some time ago, Stefan gave a good explanation about this topic (in
emacs-dev, I think).

Michael.