Nick Roberts wrote:
    
    > (defvar var1 "DOC1")
    > (defvar var2 "DOC2")
    > (defvaralias 'var1 'var2)

   I think if an alias is made only then only one of the variables needs to be
   declared.

So the idea of the present behavior would be to do a
(defvaralias 'var1 'var2) with a defvar for var1 instead of for var2?
I do not believe that would be appropriate.

   As Stefan has pointed out defvaralias has a symmetry in its
   arguments (unlike define-obsolete-variable-alias neither)

I do not understand.  The variable alias structure is a directed
graph, not an undirected graph.  The arguments to defvaralias are
asymmetric in their meaning.  The first argument is the alias, the
second the base variable.

(defvaralias 'var1 'var2)

is different (in non-trivial ways) from 

(defvaralias 'var2 'var1)

in as far as `indirect-variable', cyclic variable indirection errors
and such are concerned.

Sincerely,

Luc.



_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to