all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm@gnu.org>
To: emacs-devel@gnu.org
Subject: define-obsolete-variable-alias problem
Date: Wed, 09 Apr 2008 15:16:39 -0400	[thread overview]
Message-ID: <sviqyqalew.fsf@fencepost.gnu.org> (raw)


Given this sequence:

(progn
  (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	other threads:[~2008-04-09 19:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-09 19:16 Glenn Morris [this message]
2008-04-10  4:54 ` define-obsolete-variable-alias problem Nick Roberts
2008-04-11  1:36   ` Stefan Monnier
2008-04-11  3:53     ` Glenn Morris
2008-04-11  4:12       ` Glenn Morris
2008-04-11 17:29         ` Stefan Monnier
2008-04-11 18:03           ` Glenn Morris
2008-04-11 19:16             ` Stefan Monnier
2008-04-11 20:14               ` Glenn Morris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sviqyqalew.fsf@fencepost.gnu.org \
    --to=rgm@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.