* Bug in buffer-local-value
@ 2005-05-27 3:13 Luc Teirlinck
2005-05-28 11:53 ` Richard Stallman
0 siblings, 1 reply; 3+ messages in thread
From: Luc Teirlinck @ 2005-05-27 3:13 UTC (permalink / raw)
There is a bug in buffer-local-value, when used in connection with
defvaralias. I believe that the ielm run below is self-explanatory.
The bug affects `C-h v" in a very confusing way. I am insufficiently
familiar with the involved C code to fix this myself.
*** Welcome to IELM *** Type (describe-mode) for help.
ELISP> (defvar aa 1)
aa
ELISP> (make-variable-buffer-local 'aa)
aa
ELISP> (defvaralias 'bb 'aa)
aa
ELISP> (setq bb 2)
2
ELISP> bb
2
ELISP> aa
2
ELISP> (buffer-local-value 'bb (current-buffer))
1 ;; Bug: should be 2
ELISP> (buffer-local-value 'aa (current-buffer))
2
ELISP> (local-variable-p 'bb)
t
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Bug in buffer-local-value
2005-05-27 3:13 Bug in buffer-local-value Luc Teirlinck
@ 2005-05-28 11:53 ` Richard Stallman
2005-05-28 18:18 ` Luc Teirlinck
0 siblings, 1 reply; 3+ messages in thread
From: Richard Stallman @ 2005-05-28 11:53 UTC (permalink / raw)
Cc: emacs-devel
Does this fix it?
*** buffer.c 27 May 2005 10:21:40 -0400 1.480
--- buffer.c 28 May 2005 05:48:28 -0400
***************
*** 889,894 ****
--- 889,897 ----
CHECK_BUFFER (buffer);
buf = XBUFFER (buffer);
+ if (SYMBOLP (variable))
+ variable = indirect_variable (variable);
+
/* Look in local_var_list */
result = Fassoc (variable, buf->local_var_alist);
if (NILP (result))
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Bug in buffer-local-value
2005-05-28 11:53 ` Richard Stallman
@ 2005-05-28 18:18 ` Luc Teirlinck
0 siblings, 0 replies; 3+ messages in thread
From: Luc Teirlinck @ 2005-05-28 18:18 UTC (permalink / raw)
Cc: emacs-devel
Richard Stallman wrote:
Does this fix it?
Yes, it does.
Sincerely,
Luc.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-05-28 18:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-27 3:13 Bug in buffer-local-value Luc Teirlinck
2005-05-28 11:53 ` Richard Stallman
2005-05-28 18:18 ` Luc Teirlinck
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.