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

From: Juanma Barranquero <[email-masked]>
Date: Wed, 28 Jul 2010 02:57:14 +0200

On Wed, Jul 28, 2010 at 02:15, Johan Bockg=e5rd <[email-masked]> 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