unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#6744: 24.0.50; [PATCH] local-variable-p: Handle variable aliases correctly
@ 2010-07-28  0:15 Johan Bockg=e5rd
  2010-07-28  0:57 ` Juanma Barranquero
  2010-08-01 18:35 ` Juanma Barranquero
  0 siblings, 2 replies; 6+ messages in thread
From: Johan Bockg=e5rd @ 2010-07-28  0:15 UTC (permalink / raw)
  To: 6744

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@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))
 	  {






^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-08-03 17:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-28  0:15 bug#6744: 24.0.50; [PATCH] local-variable-p: Handle variable aliases correctly Johan Bockg=e5rd
2010-07-28  0:57 ` Juanma Barranquero
2010-07-28  3:20   ` Johan Bockgård
2010-07-28  3:33     ` Juanma Barranquero
2010-08-01 18:35 ` Juanma Barranquero
2010-08-03 17:13   ` Johan Bockgård

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).