comparison lisp/package-info.el @ 412:697ef44129c6 r21-2-14

Import from CVS: tag r21-2-14
author cvs
date Mon, 13 Aug 2007 11:20:41 +0200
parents de805c49cfc1
children
comparison
equal deleted inserted replaced
411:12e008d41344 412:697ef44129c6
1 ;;; package-info.el --- Generate information about an XEmacs package 1 ;;; package-info.el --- Generate information about an XEmacs package
2 2
3 ;; Copyright (C) 1998 by Free Software Foundation, Inc. 3 ;; Copyright (C) 1998 by Free Software Foundation, Inc.
4 4
5 ;; Author: SL Baur <steve@xemacs.org> 5 ;; Author: SL Baur <steve@altair.xemacs.org>
6 ;; Keywords: internal 6 ;; Keywords: internal
7 7
8 ;; This file is part of XEmacs. 8 ;; This file is part of XEmacs.
9 9
10 ;; XEmacs is free software; you can redistribute it and/or modify it 10 ;; XEmacs is free software; you can redistribute it and/or modify it
46 ; (insert-file-contents-literally file)) 46 ; (insert-file-contents-literally file))
47 ; ;; (write-file "/tmp/x.x") 47 ; ;; (write-file "/tmp/x.x")
48 ; (setq result (md5 (current-buffer)))) 48 ; (setq result (md5 (current-buffer))))
49 ; result)) 49 ; result))
50 50
51 ;;; APA: Stolen from package-get in package-get.el
52 (defun pi-md5sum (file) 51 (defun pi-md5sum (file)
53 (with-temp-buffer 52 (with-temp-buffer
54 (insert-file-contents-literally file) 53 (call-process "md5sum" file t)
55 (md5 (current-buffer)))) 54 (goto-char (point-min))
55 (looking-at "[a-z0-9]+")
56 (buffer-substring (match-beginning 0) (match-end 0))))
56 57
57 (defun pi-update-key (key value) 58 (defun pi-update-key (key value)
58 (save-excursion 59 (save-excursion
59 (goto-char (point-min)) 60 (goto-char (point-min))
60 (let ((case-fold-search nil)) 61 (let ((case-fold-search nil))