GNU bug report logs -
#6744
24.0.50; [PATCH] local-variable-p: Handle variable aliases correctly
Previous Next
Reported by: "Johan Bockg\=e5rd" <bojohan <at> gnu.org>
Date: Wed, 28 Jul 2010 00:16:02 UTC
Severity: normal
Tags: patch
Found in version 24.0.50
Done: Johan Bockgård <bojohan <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6744 in the body.
You can then email your comments to 6744 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6744
; Package
emacs
.
(Wed, 28 Jul 2010 00:16:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Johan Bockg\=e5rd" <bojohan <at> gnu.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 28 Jul 2010 00:16:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Found by --enable-checking.
(defvar foo nil)
(defvaralias 'bar 'foo)
(make-local-variable 'bar)
(local-variable-p 'bar)
returns nil or may crash if checking is enabled. (trunk)
2010-07-27 Johan Bockg=e5rd <bojohan <at> gnu.org>
* data.c (Flocal_variable_p): Handle variable aliases correctly.
diff --git a/src/data.c b/src/data.c
index 152a888..b78a665 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1865,6 +1865,7 @@ BUFFER defaults to the current buffer. */)
Lisp_Object tail, elt, tmp;
struct Lisp_Buffer_Local_Value *blv = SYMBOL_BLV (sym);
XSETBUFFER (tmp, buf);
+ XSETSYMBOL (variable, sym); /* Update in case of aliasing. */
for (tail = buf->local_var_alist; CONSP (tail); tail = XCDR (tail))
{
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6744
; Package
emacs
.
(Wed, 28 Jul 2010 00:58:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 6744 <at> debbugs.gnu.org (full text, mbox):
On Wed, Jul 28, 2010 at 02:15, Johan Bockg=e5rd <bojohan <at> gnu.org> wrote:
> (defvar foo nil)
> (defvaralias 'bar 'foo)
> (make-local-variable 'bar)
> (local-variable-p 'bar)
>
> returns nil or may crash if checking is enabled. (trunk)
On the trunk, setting the forms inside a progn and evaluating it at
once with C-x C-e, I get nil on first try, and a crash on second try.
On emacs-23 there's no crash, but (local-variable-p 'bar) => nil.
> + XSETSYMBOL (variable, sym); /* Update in case of aliasing. */
Does this fix work also for emacs-23?
Juanma
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6744
; Package
emacs
.
(Wed, 28 Jul 2010 03:21:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 6744 <at> debbugs.gnu.org (full text, mbox):
Juanma Barranquero <lekktu <at> gmail.com> writes:
> On Wed, Jul 28, 2010 at 02:15, Johan Bockg=e5rd <bojohan <at> gnu.org> wrote:
>
>> (defvar foo nil)
>> (defvaralias 'bar 'foo)
>> (make-local-variable 'bar)
>> (local-variable-p 'bar)
>>
>> returns nil or may crash if checking is enabled. (trunk)
>
> On the trunk, setting the forms inside a progn and evaluating it at
> once with C-x C-e, I get nil on first try, and a crash on second try.
>
> On emacs-23 there's no crash, but (local-variable-p 'bar) => nil.
It is? I thought this problem only existed in the trunk, and I can't
reproduce it in the emacs-23 branch.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6744
; Package
emacs
.
(Wed, 28 Jul 2010 03:35:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 6744 <at> debbugs.gnu.org (full text, mbox):
On Wed, Jul 28, 2010 at 05:20, Johan Bockgård <bojohan <at> gnu.org> wrote:
> It is? I thought this problem only existed in the trunk, and I can't
> reproduce it in the emacs-23 branch.
You're right, it returns t. Sorry for the noise.
Juanma
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6744
; Package
emacs
.
(Sun, 01 Aug 2010 18:36:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 6744 <at> debbugs.gnu.org (full text, mbox):
On Wed, Jul 28, 2010 at 02:15, Johan Bockg=e5rd <bojohan <at> gnu.org> wrote:
> 2010-07-27 Johan Bockg=e5rd <bojohan <at> gnu.org>
>
> * data.c (Flocal_variable_p): Handle variable aliases correctly.
>
> + XSETSYMBOL (variable, sym); /* Update in case of aliasing. */
If you think this is the right fix, please install it.
Juanma
Reply sent
to
Johan Bockgård <bojohan <at> gnu.org>
:
You have taken responsibility.
(Tue, 03 Aug 2010 17:14:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
"Johan Bockg\=e5rd" <bojohan <at> gnu.org>
:
bug acknowledged by developer.
(Tue, 03 Aug 2010 17:14:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 6744-done <at> debbugs.gnu.org (full text, mbox):
Juanma Barranquero <lekktu <at> gmail.com> writes:
> On Wed, Jul 28, 2010 at 02:15, Johan Bockg=e5rd <bojohan <at> gnu.org> wrote:
>
>> 2010-07-27 Johan Bockg=e5rd <bojohan <at> gnu.org>
>>
>> * data.c (Flocal_variable_p): Handle variable aliases correctly.
>>
>> + XSETSYMBOL (variable, sym); /* Update in case of aliasing. */
>
> If you think this is the right fix, please install it.
Done.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 01 Sep 2010 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 14 years and 291 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.