[Top][All Lists]

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

Re: battery.el: Rename display-battery-mode to battery-mode?

From: Juri Linkov
Subject: Re: battery.el: Rename display-battery-mode to battery-mode?
Date: Thu, 04 Aug 2005 19:28:48 +0300
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

>>> I tried to enable battery-mode on my notebook using `M-x battery-
>>> TAB' but I got "No match".  Eventually I found
>>> `display-battery-mode' in `battery.el'.  Shouldn't the name of the
>>> minor mode read `battery-mode' instead of `display-battery-mode'?
>> Agreed.
> (In the meantime I saw that there's one similarly named (interactive)
> command `display-time-mode'.)
>>> +(define-obsolete-function-alias 'display-battery-mode 'battery-mode "22.1")

I suspect the name `display-battery-mode' was created to be similar to
`display-time-mode' which displays additional information in the mode
line as well.  I suggest to create a valid alias `display-battery-mode'
for renamed `battery-mode' instead of declaring it obsolete
(i.e. to use `defalias' instead of `define-obsolete-function-alias').
Maybe, you also need to create a variable alias `display-battery-mode'
for `battery-mode' because `define-minor-mode' creates a global variable.

Juri Linkov

reply via email to

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