]> code.delx.au - gnu-emacs/commitdiff
2003-09-10 Mario Lang <mlang@delysid.org>
authorAlex Schroeder <alex@gnu.org>
Wed, 10 Sep 2003 19:51:01 +0000 (19:51 +0000)
committerAlex Schroeder <alex@gnu.org>
Wed, 10 Sep 2003 19:51:01 +0000 (19:51 +0000)
Update Commentary and Copyright.
(battery-linux-proc-acpi): Fix a bug in %b which made "!" never
appear due to wrong ordering of the expressions in `or'.

lisp/battery.el

index 068f1ab50d5244e9bc38d9e42e438f5ed1192b4f..c82d3ac02b3c450c782bce24705e0b5193a22721 100644 (file)
@@ -1,6 +1,6 @@
 ;;; battery.el --- display battery status information
 
-;; Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1998, 2000, 2001, 2003 Free Software Foundation, Inc.
 
 ;; Author: Ralph Schleicher <rs@nunatak.allgaeu.org>
 ;; Keywords: hardware
@@ -24,9 +24,9 @@
 
 ;;; Commentary:
 
-;; There is at present only a function interpreting the new `/proc/apm'
-;; file format of Linux version 1.3.58 or newer.  That is, what a lucky
-;; coincidence, exactly the interface provided by the author's laptop.
+;; There is at present support for interpreting the new `/proc/apm'
+;; file format of Linux version 1.3.58 or newer and for the `/proc/acpi/'
+;; directory structure of Linux 2.4.20 and 2.6.
 
 ;;; Code:
 
@@ -308,8 +308,8 @@ The following %-sequences are provided:
          (cons ?r (or (and rate (number-to-string rate)) "N/A"))
          (cons ?B (or charging-state "N/A"))
          (cons ?b (or (and (string= charging-state "charging") "+")
-                      (and warn (< capacity warn) "-")
                       (and low (< capacity low) "!")
+                      (and warn (< capacity warn) "-")
                       ""))
          (cons ?h (or (and hours (number-to-string hours)) "N/A"))
          (cons ?m (or (and minutes (number-to-string minutes)) "N/A"))