emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't M-x compile-defun `edebug' because dynamic variables are false


From: Alan Mackenzie
Subject: Re: Can't M-x compile-defun `edebug' because dynamic variables are falsely taken as lexical.
Date: Tue, 3 Jan 2017 21:32:28 +0000
User-agent: Mutt/1.5.24 (2015-08-30)

Hello, Stefan.

On Tue, Jan 03, 2017 at 01:35:19PM -0500, Stefan Monnier wrote:
> > I want to M-x compile-defun the function `edebug'.

> Looks like `compile-defun` is another function that needs to be changed
> to use `eval-sexp-add-defvars`.

It looks like you've already done that, possibly on 2015-10-29.  Looking
at the source (now I know what to look for), eval-sexp-add-defvars is
also in Emacs 25.1's source for compile-defun.  So, something else has
gone wrong.....

I think the something else might be in Fdefvar.  At its outermost level
Fdefvar contains:

###############################################
  (Lisp_Object args)
{
  Lisp_Object sym, tem, tail;

  sym = XCAR (args);
  tail = XCDR (args);

  if (CONSP (tail))
    {
......
      /* Do it before evaluating the initial value, for self-references.  */
      XSYMBOL (sym)->declared_special = 1;
......
    }
###############################################

, so the question becomes why is setting the declared_special flag done
inside the "if (CONSP (tail))" rather than outside?  I.e. why is it only
done when a variable has an initialisation?

>         Stefan

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]