GNU bug report logs - #6744
24.0.50; [PATCH] local-variable-p: Handle variable aliases correctly

Previous Next

Package: emacs;

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.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Johan Bockgård <bojohan <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#6744: closed (24.0.50; [PATCH] local-variable-p: Handle
 variable aliases correctly)
Date: Tue, 03 Aug 2010 17:14:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Tue, 03 Aug 2010 19:13:49 +0200
with message-id <87aap38vqq.fsf <at> gnu.org>
and subject line Re: bug#6744: 24.0.50; [PATCH] local-variable-p: Handle variable  aliases correctly
has caused the GNU bug report #6744,
regarding 24.0.50; [PATCH] local-variable-p: Handle variable aliases correctly
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
6744: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6744
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: "Johan Bockg\=e5rd" <bojohan <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.50; [PATCH] local-variable-p: Handle variable aliases correctly
Date: Wed, 28 Jul 2010 02:15:32 +0200
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))
 	  {



[Message part 3 (message/rfc822, inline)]
From: Johan Bockgård <bojohan <at> gnu.org>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: 6744-done <at> debbugs.gnu.org
Subject: Re: bug#6744: 24.0.50;
	[PATCH] local-variable-p: Handle variable  aliases correctly
Date: Tue, 03 Aug 2010 19:13:49 +0200
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.


This bug report was last modified 14 years and 292 days ago.

Previous Next


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