all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Range error in battery.el
@ 2006-10-31  0:42 Andreas Seltenreich
  2006-11-01  2:13 ` Richard Stallman
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Seltenreich @ 2006-10-31  0:42 UTC (permalink / raw)


Hi,

the attached patch prevents a range error that causes
battery-mode-line-string to get stale when batteries are unplugged.

regards,
andreas

Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.10234
diff -c -0 -r1.10234 ChangeLog
*** ChangeLog	30 Oct 2006 23:24:18 -0000	1.10234
--- ChangeLog	30 Oct 2006 23:49:07 -0000
***************
*** 0 ****
--- 1,5 ----
+ 2006-10-31  Andreas Seltenreich  <uwi7@rz.uni-karlsruhe.de>
+ 
+ 	* battery.el (battery-linux-proc-acpi): Prevent range error when
+ 	`full-capacity' is 0.
+ 
Index: battery.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/battery.el,v
retrieving revision 1.36
diff -c -r1.36 battery.el
*** battery.el	9 May 2006 22:43:35 -0000	1.36
--- battery.el	30 Oct 2006 23:49:09 -0000
***************
*** 408,413 ****
--- 408,414 ----
  			    (format "%d:%02d" hours (- minutes (* 60 hours))))
  		       "N/A"))
  	  (cons ?p (or (and full-capacity capacity
+ 			    (> full-capacity 0)
  			    (number-to-string
  			     (floor (/ capacity
  				       (/ (float full-capacity) 100)))))

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Range error in battery.el
  2006-10-31  0:42 Range error in battery.el Andreas Seltenreich
@ 2006-11-01  2:13 ` Richard Stallman
  2006-11-01 14:24   ` Chong Yidong
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Stallman @ 2006-11-01  2:13 UTC (permalink / raw)
  Cc: emacs-devel

Your change is good.  Would someone please install?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Range error in battery.el
  2006-11-01  2:13 ` Richard Stallman
@ 2006-11-01 14:24   ` Chong Yidong
  0 siblings, 0 replies; 3+ messages in thread
From: Chong Yidong @ 2006-11-01 14:24 UTC (permalink / raw)
  Cc: emacs-devel, Andreas Seltenreich

Richard Stallman <rms@gnu.org> writes:

> Your change is good.  Would someone please install?

Done.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-11-01 14:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-31  0:42 Range error in battery.el Andreas Seltenreich
2006-11-01  2:13 ` Richard Stallman
2006-11-01 14:24   ` Chong Yidong

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.