GNU bug report logs - #20521
Viper version is 3.14.2 of July 4, 2013; After some hours of use I don't enter viper mode automatically on new files

Previous Next

Package: emacs;

Reported by: Alan Morgan <Alan.Morgan <at> nextlabs.com>

Date: Wed, 6 May 2015 23:40:04 UTC

Severity: normal

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #29 received at 20521 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Alan Morgan <Alan.Morgan <at> nextlabs.com>
Cc: "20521 <at> debbugs.gnu.org" <20521 <at> debbugs.gnu.org>
Subject: Re: bug#20521: setq-local definitely behaving oddly for viper mode
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




This bug report was last modified 3 years and 104 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.