emacs-devel
[Top][All Lists]
Advanced

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

Re: smerge fix


From: Richard Stallman
Subject: Re: smerge fix
Date: Fri, 23 Aug 2002 20:32:50 -0600 (MDT)

Using defvar inside eval-when-compile is rather a nuisance.
Whatever we recommend for preventing warnings about unknown
variables, it should be more convenient than that.

What we actually recommend for the purpose is a plain defvar.

Whatever we recommend for preventing warnings about unknown variables,
it should not cause anything to happen when the file is unloaded.

So either we should change unloading of packages to ignore
defvars that didn't specify a value,
or we should recommend something other than defvar
as the way to say it's ok to reference a certain variable
without defining it.

The easiest thing to do is to say that simple (defvar foo)
does not count as a definition.  Deleting the following code
in Fdefvar seems to be enough:

  else
    /* A (defvar <var>) should not take precedence in the load-history over
       an earlier (defvar <var> <val>), so only add to history if the default
       value is still unbound.  */
    if (NILP (tem))
      LOADHIST_ATTACH (sym);

There was another bug report saying that unloading a file
would do makunbound on the function names defined in the file.
That is not right either.  I decided to fix them both.




reply via email to

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