aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoah Friedman2001-12-10 10:22:22 +0000
committerNoah Friedman2001-12-10 10:22:22 +0000
commit440c4d7aa858844a0ff64ce28e76c2628ad978a3 (patch)
treee7bd31ab4e4f2e0974e00b670f19b18310987dc7
parent5e18d6323651d57719001b2b54e8209a6d8f0044 (diff)
downloademacs-440c4d7aa858844a0ff64ce28e76c2628ad978a3.tar.gz
emacs-440c4d7aa858844a0ff64ce28e76c2628ad978a3.zip
(battery-insert-file-contents): Obsolete function removed.
(battery-read-function): Obsolete function removed. (battery-linux-proc-apm): Use insert-file-contents.
-rw-r--r--lisp/ChangeLog11
-rw-r--r--lisp/battery.el20
2 files changed, 10 insertions, 21 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f3450233bcc..9a01ba38fa6 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12001-12-10 Noah Friedman <friedman@splode.com>
2
3 * battery.el (battery-insert-file-contents): Obsolete function
4 removed.
5 (battery-read-function): Obsolete function removed.
6 (battery-linux-proc-apm): Use insert-file-contents.
7
12001-12-07 Stephen Eglen <stephen@gnu.org> 82001-12-07 Stephen Eglen <stephen@gnu.org>
2 9
3 * iswitchb.el (iswitchb-visit-buffer): Use 10 * iswitchb.el (iswitchb-visit-buffer): Use
@@ -45,8 +52,8 @@
45 unibyte codes. 52 unibyte codes.
46 53
47 * language/european.el (diacritic-composition-pattern): New constant. 54 * language/european.el (diacritic-composition-pattern): New constant.
48 (diacritic-compose-region, diacritic-compose-string) 55 (diacritic-compose-region, diacritic-compose-string)
49 (diacritic-compose-buffer, diacritic-post-read-conversion) 56 (diacritic-compose-buffer, diacritic-post-read-conversion)
50 (diacritic-composition-function): New functions. 57 (diacritic-composition-function): New functions.
51 58
52 * international/utf-8.el (ucs-mule-to-mule-unicode): New 59 * international/utf-8.el (ucs-mule-to-mule-unicode): New
diff --git a/lisp/battery.el b/lisp/battery.el
index b4e07f74a53..5980a839a4a 100644
--- a/lisp/battery.el
+++ b/lisp/battery.el
@@ -171,7 +171,7 @@ The following %-sequences are provided:
171 (setq buffer (get-buffer-create " *battery*")) 171 (setq buffer (get-buffer-create " *battery*"))
172 (set-buffer buffer) 172 (set-buffer buffer)
173 (erase-buffer) 173 (erase-buffer)
174 (battery-insert-file-contents "/proc/apm") 174 (insert-file-contents "/proc/apm")
175 (re-search-forward battery-linux-proc-apm-regexp) 175 (re-search-forward battery-linux-proc-apm-regexp)
176 (setq driver-version (match-string 1)) 176 (setq driver-version (match-string 1))
177 (setq bios-version (match-string 2)) 177 (setq bios-version (match-string 2))
@@ -242,24 +242,6 @@ The following %-sequences are provided:
242 (setq result (concat result "%"))) 242 (setq result (concat result "%")))
243 result)) 243 result))
244 244
245(defun battery-insert-file-contents (file-name)
246 "Insert contents of file FILE-NAME after point.
247FILE-NAME can be a non-ordinary file, for example, a named pipe.
248Return t if file exists."
249 (let ((load-read-function 'battery-read-function)
250 (load-source-file-function nil)
251 (load-path '("."))
252 (load-history nil))
253 (save-excursion
254 (load file-name nil t t))))
255
256(defun battery-read-function (&optional stream)
257 "Function for reading expressions from STREAM.
258Value is always nil."
259 (let (char)
260 (while (not (< (setq char (get-file-char)) 0))
261 (insert char))))
262
263(defconst battery-hex-map '((?0 . 0) (?1 . 1) (?2 . 2) (?3 . 3) 245(defconst battery-hex-map '((?0 . 0) (?1 . 1) (?2 . 2) (?3 . 3)
264 (?4 . 4) (?5 . 5) (?6 . 6) (?7 . 7) 246 (?4 . 4) (?5 . 5) (?6 . 6) (?7 . 7)
265 (?8 . 8) (?9 . 9) (?a . 10) (?b . 11) 247 (?8 . 8) (?9 . 9) (?a . 10) (?b . 11)