mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-18 20:00:36 -08:00
(battery-linux-proc-apm): Fix typo in docstring.
Catch errors with ignore-errors. Use temporary buffer. (battery-linux-proc-acpi): Fix typo in docstring. Document `%r'.
This commit is contained in:
parent
b97c98ad01
commit
12d6b12433
2 changed files with 43 additions and 42 deletions
|
|
@ -1,5 +1,9 @@
|
|||
2005-07-01 Lute Kamstra <lute@gnu.org>
|
||||
|
||||
* battery.el (battery-linux-proc-apm): Fix typo in docstring.
|
||||
Catch errors with ignore-errors. Use temporary buffer.
|
||||
(battery-linux-proc-acpi): Fix typo in docstring. Document `%r'.
|
||||
|
||||
* facemenu.el (facemenu-unlisted-faces): Delete foreground and
|
||||
background color faces.
|
||||
(facemenu-set-foreground, facemenu-set-background): Use
|
||||
|
|
|
|||
|
|
@ -171,21 +171,17 @@ The following %-sequences are provided:
|
|||
%B Battery status (verbose)
|
||||
%b Battery status, empty means high, `-' means low,
|
||||
`!' means critical, and `+' means charging
|
||||
%p battery load percentage
|
||||
%p Battery load percentage
|
||||
%s Remaining time in seconds
|
||||
%m Remaining time in minutes
|
||||
%h Remaining time in hours
|
||||
%t Remaining time in the form `h:min'"
|
||||
(let (driver-version bios-version bios-interface line-status
|
||||
battery-status battery-status-symbol load-percentage
|
||||
seconds minutes hours remaining-time buffer tem)
|
||||
(unwind-protect
|
||||
(save-excursion
|
||||
(setq buffer (get-buffer-create " *battery*"))
|
||||
(set-buffer buffer)
|
||||
(erase-buffer)
|
||||
(insert-file-contents "/proc/apm")
|
||||
(re-search-forward battery-linux-proc-apm-regexp)
|
||||
seconds minutes hours remaining-time tem)
|
||||
(with-temp-buffer
|
||||
(ignore-errors (insert-file-contents "/proc/apm"))
|
||||
(when (re-search-forward battery-linux-proc-apm-regexp)
|
||||
(setq driver-version (match-string 1))
|
||||
(setq bios-version (match-string 2))
|
||||
(setq tem (string-to-number (match-string 3) 16))
|
||||
|
|
@ -240,12 +236,13 @@ in Linux version 2.4.20 and 2.6.0.
|
|||
|
||||
The following %-sequences are provided:
|
||||
%c Current capacity (mAh)
|
||||
%r Current rate
|
||||
%B Battery status (verbose)
|
||||
%b Battery status, empty means high, `-' means low,
|
||||
`!' means critical, and `+' means charging
|
||||
%d Temperature (in degrees Celsius)
|
||||
%L AC line status (verbose)
|
||||
%p battery load percentage
|
||||
%p Battery load percentage
|
||||
%m Remaining time in minutes
|
||||
%h Remaining time in hours
|
||||
%t Remaining time in the form `h:min'"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue