[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/battery.el
From: |
Noah Friedman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/battery.el |
Date: |
Mon, 10 Dec 2001 05:22:05 -0500 |
Index: emacs/lisp/battery.el
diff -c emacs/lisp/battery.el:1.14 emacs/lisp/battery.el:1.15
*** emacs/lisp/battery.el:1.14 Wed Aug 8 16:11:46 2001
--- emacs/lisp/battery.el Mon Dec 10 05:22:02 2001
***************
*** 171,177 ****
(setq buffer (get-buffer-create " *battery*"))
(set-buffer buffer)
(erase-buffer)
! (battery-insert-file-contents "/proc/apm")
(re-search-forward battery-linux-proc-apm-regexp)
(setq driver-version (match-string 1))
(setq bios-version (match-string 2))
--- 171,177 ----
(setq buffer (get-buffer-create " *battery*"))
(set-buffer buffer)
(erase-buffer)
! (insert-file-contents "/proc/apm")
(re-search-forward battery-linux-proc-apm-regexp)
(setq driver-version (match-string 1))
(setq bios-version (match-string 2))
***************
*** 241,264 ****
(or (null flag)
(setq result (concat result "%")))
result))
-
- (defun battery-insert-file-contents (file-name)
- "Insert contents of file FILE-NAME after point.
- FILE-NAME can be a non-ordinary file, for example, a named pipe.
- Return t if file exists."
- (let ((load-read-function 'battery-read-function)
- (load-source-file-function nil)
- (load-path '("."))
- (load-history nil))
- (save-excursion
- (load file-name nil t t))))
-
- (defun battery-read-function (&optional stream)
- "Function for reading expressions from STREAM.
- Value is always nil."
- (let (char)
- (while (not (< (setq char (get-file-char)) 0))
- (insert char))))
(defconst battery-hex-map '((?0 . 0) (?1 . 1) (?2 . 2) (?3 . 3)
(?4 . 4) (?5 . 5) (?6 . 6) (?7 . 7)
--- 241,246 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/battery.el,
Noah Friedman <=