Subject: bug#10017: 24.0.91; buffer-local-value no longer works

From: Glenn Morris <[email-masked]>
Date: Fri, 11 Nov 2011 03:33:36 -0500

Leo wrote:

> 1. Assume w is set to a window with some buffer-local VAR
> 2. (buffer-local-value VAR (window-buffer w)) is always nil unless that
>    buffer is current

Works for me.

emacs -Q
C-x 4 b foo RET
In buffer foo:

(setq fill-column 10
      w (selected-window))

In buffer scratch:

fill-column   ; 70
(buffer-local-value 'fill-column (get-buffer "foo"))  ; 10
(buffer-local-value 'fill-column (window-buffer w))   ; 10