[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#5950: defvaralias after defvar should be warned in runtime
From: |
IRIE Shinsuke |
Subject: |
bug#5950: defvaralias after defvar should be warned in runtime |
Date: |
Thu, 15 Apr 2010 14:13:58 +0900 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100404 Thunderbird/3.0.4 |
Please consider below:
We assume an user wrote .emacs file as:
(setq old-foo 123)
(load "bar")
Here, bar.el includes the following:
(defvar foo 456)
(define-obsolete-variable-alias 'old-foo 'foo)
By this .emacs setting, the user probably hopes `old-foo' remains 123
after loading bar.el, but actually it will be changed to 456. This
behavior is inconsistent with the principle that `defvar' must not
override existing value, so bar.el should be modified as:
(define-obsolete-variable-alias 'old-foo 'foo)
(defvar foo 456)
I think the programs like bar.el should be warned when running (and
byte-compiling, if possible).
--
IRIE Shinsuke, Ph.D.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#5950: defvaralias after defvar should be warned in runtime,
IRIE Shinsuke <=