[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#5971: 23.1.95; `delete' modifies default value instead of buffer-loc
From: |
Drew Adams |
Subject: |
bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value |
Date: |
Mon, 19 Apr 2010 15:06:08 -0700 |
> > If there is _no_ buffer-local value, then the default value
> > is returned for the var.
>
> Exactly.
OK, I get it.
The problem was that the defvar defined a default value that was a particular
cons cell. Then, I set the buffer-local value to (a modification of) that list
structure, since the initial value returned by the variable was the default one.
IOW, in the setq, it was the right-hand side, where the variable's value was
used, that was the problem.
Before closing the bug, please consider adding something to the doc that might
make this gotcha clearer. Perhaps something like this:
Although `make-variable-buffer-local' makes its argument variable become buffer
local whenever it is set, any references to the variable before it is set return
its default value. That includes any occurrences of the variable in an
expression used to calculate the new, buffer-local value.
Thanks.
- bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value, (continued)
- bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value, Glenn Morris, 2010/04/19
- bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value, Andreas Schwab, 2010/04/19
- bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value, Drew Adams, 2010/04/19
- bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value, Andreas Schwab, 2010/04/19
- bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value, Drew Adams, 2010/04/19
- bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value, Andreas Schwab, 2010/04/19
- bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value, Drew Adams, 2010/04/19
- bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value, Andreas Schwab, 2010/04/19
- bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value, Drew Adams, 2010/04/19
- bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value, Andreas Schwab, 2010/04/19
- bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value,
Drew Adams <=
- bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value, Kevin Rodgers, 2010/04/21
- bug#5971: 23.1.95; `delete' modifies default value instead of buffer-local value, Drew Adams, 2010/04/21
- bug#5971: - reopen, Drew Adams, 2010/04/19