summaryrefslogtreecommitdiff
path: root/lisp/battery.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2012-07-10 07:51:54 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2012-07-10 07:51:54 -0400
commitf58e0fd503567288bb30e243595acaa589034929 (patch)
treee40cb0a5c087c0af4bdd41948d655358b0fcd56e /lisp/battery.el
parentdfa96edd13d1db4a90fa0977d06b6bdeab2f642e (diff)
downloademacs-f58e0fd503567288bb30e243595acaa589034929.tar.gz
Reduce use of (require 'cl).
* admin/bzrmerge.el: Use cl-lib. * leim/quail/hangul.el: Don't require CL. * leim/quail/ipa.el: Use cl-lib. * vc/smerge-mode.el, vc/pcvs.el, vc/pcvs-util.el, vc/pcvs-info.el: * vc/diff-mode.el, vc/cvs-status.el, uniquify.el, scroll-bar.el: * register.el, progmodes/sh-script.el, net/gnutls.el, net/dbus.el: * msb.el, mpc.el, minibuffer.el, international/ucs-normalize.el: * international/quail.el, info-xref.el, imenu.el, image-mode.el: * font-lock.el, filesets.el, edmacro.el, doc-view.el, bookmark.el: * battery.el, avoid.el, abbrev.el: Use cl-lib. * vc/pcvs-parse.el, vc/pcvs-defs.el, vc/log-view.el, vc/log-edit.el: * vc/diff.el, simple.el, pcomplete.el, lpr.el, comint.el, loadhist.el: * jit-lock.el, international/iso-ascii.el, info.el, frame.el, bs.el: * emulation/crisp.el, electric.el, dired.el, cus-dep.el, composite.el: * calculator.el, autorevert.el, apropos.el: Don't require CL. * emacs-bytecomp.el (byte-recompile-directory, display-call-tree) (byte-compile-unfold-bcf, byte-compile-check-variable): * emacs-byte-opt.el (byte-compile-trueconstp) (byte-compile-nilconstp): * emacs-autoload.el (make-autoload): Use pcase. * face-remap.el (text-scale-adjust): Simplify pcase patterns.
Diffstat (limited to 'lisp/battery.el')
-rw-r--r--lisp/battery.el11
1 files changed, 5 insertions, 6 deletions
diff --git a/lisp/battery.el b/lisp/battery.el
index dcfe07121b3..8e98291b11c 100644
--- a/lisp/battery.el
+++ b/lisp/battery.el
@@ -31,8 +31,7 @@
;;; Code:
(require 'timer)
-(eval-when-compile (require 'cl))
-
+(eval-when-compile (require 'cl-lib))
(defgroup battery nil
"Display battery status information."
@@ -360,16 +359,16 @@ The following %-sequences are provided:
(when (re-search-forward "present: +yes$" nil t)
(when (re-search-forward "design capacity: +\\([0-9]+\\) m[AW]h$"
nil t)
- (incf design-capacity (string-to-number (match-string 1))))
+ (cl-incf design-capacity (string-to-number (match-string 1))))
(when (re-search-forward "last full capacity: +\\([0-9]+\\) m[AW]h$"
nil t)
- (incf last-full-capacity (string-to-number (match-string 1))))
+ (cl-incf last-full-capacity (string-to-number (match-string 1))))
(when (re-search-forward
"design capacity warning: +\\([0-9]+\\) m[AW]h$" nil t)
- (incf warn (string-to-number (match-string 1))))
+ (cl-incf warn (string-to-number (match-string 1))))
(when (re-search-forward "design capacity low: +\\([0-9]+\\) m[AW]h$"
nil t)
- (incf low (string-to-number (match-string 1)))))))
+ (cl-incf low (string-to-number (match-string 1)))))))
(setq full-capacity (if (> last-full-capacity 0)
last-full-capacity design-capacity))
(and capacity rate