# HG changeset patch # User Richard M. Stallman # Date 1104165650 0 # Node ID 38f1d5865861e738dd21e127b68d12a732bd288a # Parent 52e7defa066979fd1aecccb6f329fab195a81360 (battery-mode-line-format): Remove initial spaces. diff -r 52e7defa0669 -r 38f1d5865861 lisp/battery.el --- a/lisp/battery.el Mon Dec 27 16:38:57 2004 +0000 +++ b/lisp/battery.el Mon Dec 27 16:40:50 2004 +0000 @@ -73,12 +73,13 @@ (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 @@ (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))