Subject: Re: bug#20521: setq-local definitely behaving oddly for viper mode

From: Stefan Monnier <[email-masked]>
Date: Wed, 27 May 2015 22:02:34 -0400

> (progn
>   (make-variable-buffer-local 'x)
>   (let ((x 0))
>     (setq-local x 1)
>     (cons (local-variable-p 'x)
>           (default-value 'x))))
>  => (nil . 1)

I think that's a bug.
setq-local uses make-local-variable and that *should* create
a buffer-local binding, even if the variable is currently let-bound.
The fact that the variable is `make-variable-buffer-local' is no excuse.

        Stefan