diff options
author | Richard M. Stallman <rms@gnu.org> | 2004-12-27 16:40:50 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2004-12-27 16:40:50 +0000 |
commit | f4c4fc7494fffbea678c6ec39647cb3036d58619 (patch) | |
tree | 61430eb2a3cda8582c1a5b4d8c7aada3bafb7f75 /lisp/battery.el | |
parent | 9947768432a30b328717e42d1bfd9358eaf32bb6 (diff) | |
download | emacs-f4c4fc7494fffbea678c6ec39647cb3036d58619.tar.gz |
(battery-mode-line-format): Remove initial spaces.
Diffstat (limited to 'lisp/battery.el')
-rw-r--r-- | lisp/battery.el | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lisp/battery.el b/lisp/battery.el index 7b172321602..b8790450735 100644 --- a/lisp/battery.el +++ b/lisp/battery.el @@ -73,12 +73,13 @@ string are substituted as defined by the current value of the variable (defvar battery-mode-line-string nil "String to display in the mode line.") +;;;###autoload (put 'battery-mode-line-string 'risky-local-variable t) (defcustom battery-mode-line-format (cond ((eq battery-status-function 'battery-linux-proc-apm) - " [%b%p%%]") + "[%b%p%%]") ((eq battery-status-function 'battery-linux-proc-acpi) - " [%b%p%%,%d°C]")) + "[%b%p%%,%d°C]")) "*Control string formatting the string to display in the mode line. Ordinary characters in the control string are printed as-is, while conversion specifications introduced by a `%' character in the control @@ -128,13 +129,14 @@ seconds." (defun battery-update () "Update battery status information in the mode line." - (setq battery-mode-line-string (propertize (if (and battery-mode-line-format - battery-status-function) - (battery-format - battery-mode-line-format - (funcall battery-status-function)) - "") - 'help-echo "Battery status information")) + (setq battery-mode-line-string + (propertize (if (and battery-mode-line-format + battery-status-function) + (battery-format + battery-mode-line-format + (funcall battery-status-function)) + "") + 'help-echo "Battery status information")) (force-mode-line-update)) |