Show
Ignore:
Timestamp:
04/16/06 21:46:31 (3 years ago)
Author:
miyoshi
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lisp/battery.el

    r4037 r4058  
    7878conversion specifications introduced by a `%' character in the control 
    7979string are substituted as defined by the current value of the variable 
    80 `battery-status-function'." 
     80`battery-status-function'.  Here are the ones generally available: 
     81%c Current capacity (mAh or mWh) 
     82%r Current rate of charge or discharge 
     83%B Battery status (verbose) 
     84%b Battery status: empty means high, `-' means low, 
     85   `!' means critical, and `+' means charging 
     86%d Temperature (in degrees Celsius) 
     87%L AC line status (verbose) 
     88%p Battery load percentage 
     89%m Remaining time (to charge or discharge) in minutes 
     90%h Remaining time (to charge or discharge) in hours 
     91%t Remaining time (to charge or discharge) in the form `h:min'" 
    8192  :type '(choice string (const nil)) 
    8293  :group 'battery) 
     
    97108conversion specifications introduced by a `%' character in the control 
    98109string are substituted as defined by the current value of the variable 
    99 `battery-status-function'." 
     110`battery-status-function'.  Here are the ones generally available: 
     111%c Current capacity (mAh or mWh) 
     112%r Current rate of charge or discharge 
     113%B Battery status (verbose) 
     114%b Battery status: empty means high, `-' means low, 
     115   `!' means critical, and `+' means charging 
     116%d Temperature (in degrees Celsius) 
     117%L AC line status (verbose) 
     118%p Battery load percentage 
     119%m Remaining time (to charge or discharge) in minutes 
     120%h Remaining time (to charge or discharge) in hours 
     121%t Remaining time (to charge or discharge) in the form `h:min'" 
    100122  :type '(choice string (const nil)) 
    101123  :group 'battery) 
     
    197219   `!' means critical, and `+' means charging 
    198220%p Battery load percentage 
    199 %s Remaining time in seconds 
    200 %m Remaining time in minutes 
    201 %h Remaining time in hours 
    202 %t Remaining time in the form `h:min'" 
     221%s Remaining time (to charge or discharge) in seconds 
     222%m Remaining time (to charge or discharge) in minutes 
     223%h Remaining time (to charge or discharge) in hours 
     224%t Remaining time (to charge or discharge) in the form `h:min'" 
    203225  (let (driver-version bios-version bios-interface line-status 
    204226        battery-status battery-status-symbol load-percentage 
     
    268290%L AC line status (verbose) 
    269291%p Battery load percentage 
    270 %m Remaining time in minutes 
    271 %h Remaining time in hours 
    272 %t Remaining time in the form `h:min'" 
     292%m Remaining time (to charge or discharge) in minutes 
     293%h Remaining time (to charge or discharge) in hours 
     294%t Remaining time (to charge or discharge) in the form `h:min'" 
    273295  (let ((design-capacity 0) 
    274296        (last-full-capacity 0) 
     
    288310        (when (re-search-forward "present: +yes$" nil t) 
    289311          (and (re-search-forward "charging state: +\\(.*\\)$" nil t) 
    290                (member charging-state '("unknown" nil)) 
     312               (member charging-state '("unknown" "charged" nil)) 
    291313               ;; On most multi-battery systems, most of the time only one 
    292314               ;; battery is "charging"/"discharging", the others are 
     
    370392          (cons ?B (or charging-state "N/A")) 
    371393          (cons ?b (or (and (string= charging-state "charging") "+") 
    372                        (and (< capacity low) "!") 
    373                        (and (< capacity warn) "-") 
     394                       (and capacity (< capacity low) "!") 
     395                       (and capacity (< capacity warn) "-") 
    374396                       "")) 
    375397          (cons ?h (or (and hours (number-to-string hours)) "N/A"))