diff options
| author | Richard M. Stallman | 2004-12-27 16:40:50 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2004-12-27 16:40:50 +0000 |
| commit | f4c4fc7494fffbea678c6ec39647cb3036d58619 (patch) | |
| tree | 61430eb2a3cda8582c1a5b4d8c7aada3bafb7f75 | |
| parent | 9947768432a30b328717e42d1bfd9358eaf32bb6 (diff) | |
| download | emacs-f4c4fc7494fffbea678c6ec39647cb3036d58619.tar.gz emacs-f4c4fc7494fffbea678c6ec39647cb3036d58619.zip | |
(battery-mode-line-format): Remove initial spaces.
| -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 | |||
| 73 | 73 | ||
| 74 | (defvar battery-mode-line-string nil | 74 | (defvar battery-mode-line-string nil |
| 75 | "String to display in the mode line.") | 75 | "String to display in the mode line.") |
| 76 | ;;;###autoload (put 'battery-mode-line-string 'risky-local-variable t) | ||
| 76 | 77 | ||
| 77 | (defcustom battery-mode-line-format | 78 | (defcustom battery-mode-line-format |
| 78 | (cond ((eq battery-status-function 'battery-linux-proc-apm) | 79 | (cond ((eq battery-status-function 'battery-linux-proc-apm) |
| 79 | " [%b%p%%]") | 80 | "[%b%p%%]") |
| 80 | ((eq battery-status-function 'battery-linux-proc-acpi) | 81 | ((eq battery-status-function 'battery-linux-proc-acpi) |
| 81 | " [%b%p%%,%d°C]")) | 82 | "[%b%p%%,%d°C]")) |
| 82 | "*Control string formatting the string to display in the mode line. | 83 | "*Control string formatting the string to display in the mode line. |
| 83 | Ordinary characters in the control string are printed as-is, while | 84 | Ordinary characters in the control string are printed as-is, while |
| 84 | conversion specifications introduced by a `%' character in the control | 85 | conversion specifications introduced by a `%' character in the control |
| @@ -128,13 +129,14 @@ seconds." | |||
| 128 | 129 | ||
| 129 | (defun battery-update () | 130 | (defun battery-update () |
| 130 | "Update battery status information in the mode line." | 131 | "Update battery status information in the mode line." |
| 131 | (setq battery-mode-line-string (propertize (if (and battery-mode-line-format | 132 | (setq battery-mode-line-string |
| 132 | battery-status-function) | 133 | (propertize (if (and battery-mode-line-format |
| 133 | (battery-format | 134 | battery-status-function) |
| 134 | battery-mode-line-format | 135 | (battery-format |
| 135 | (funcall battery-status-function)) | 136 | battery-mode-line-format |
| 136 | "") | 137 | (funcall battery-status-function)) |
| 137 | 'help-echo "Battery status information")) | 138 | "") |
| 139 | 'help-echo "Battery status information")) | ||
| 138 | (force-mode-line-update)) | 140 | (force-mode-line-update)) |
| 139 | 141 | ||
| 140 | 142 | ||