[Top][All Lists]

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

define-obsolete-variable-alias problem

From: Glenn Morris
Subject: define-obsolete-variable-alias problem
Date: Wed, 09 Apr 2008 15:16:39 -0400
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Given this sequence:

  (setq foo 1)
  (define-obsolete-variable-alias 'foo 'bar)
  (defvar bar 2))

I'd have expected the end result to be bar = foo = 1.
However, the actual result is bar = foo = 2.

This is a problem for the case where I have:

  (setq old-variable-name 1)

in my ~/.emacs, and a package uses:

  (define-obsolete-variable-name 'old-variable-name 'new-variable-name)
  (defcustom new-variable-name 2)

because it means that my customization is ignored. The only solution
seems to be to ;;;###autoload the define-obsolete-variable-name
statement, and AFAICS by extension every such statement in Emacs,
where the variable is user option that might be set in ~.emacs. Is
this really how it is supposed to work?

reply via email to

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