Mercurial > hg > xemacs-beta
changeset 628:e545f3ec2337
[xemacs-hg @ 2001-07-14 08:42:16 by youngs]
2001-07-14 Sean MacLennan <seanm@storm.ca>
* package-admin.el (package-install-hook): New.
(package-delete-hook): New.
(package-admin-add-single-file-package): Use package-delete-hook.
* package-get.el (package-get): Use package-install-hook.
author | youngs |
---|---|
date | Sat, 14 Jul 2001 08:42:17 +0000 |
parents | a813963500d8 |
children | a6c89d799f00 |
files | lisp/ChangeLog lisp/package-admin.el lisp/package-get.el |
diffstat | 3 files changed, 20 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Thu Jul 12 06:29:10 2001 +0000 +++ b/lisp/ChangeLog Sat Jul 14 08:42:17 2001 +0000 @@ -1,3 +1,11 @@ +2001-07-14 Sean MacLennan <seanm@storm.ca> + + * package-admin.el (package-install-hook): New. + (package-delete-hook): New. + (package-admin-add-single-file-package): Use package-delete-hook. + + * package-get.el (package-get): Use package-install-hook. + 2001-06-26 Robert Pluim <rpluim@bigfoot.com> * packages.el (locate-library): change to use read-library-name so
--- a/lisp/package-admin.el Thu Jul 12 06:29:10 2001 +0000 +++ b/lisp/package-admin.el Sat Jul 14 08:42:17 2001 +0000 @@ -104,6 +104,16 @@ unfortunately, contain spaces, so be careful in constructing any regexps.") +(defvar package-install-hook nil + "*List of hook functions to be called when a new package is successfully +installed. The hook function is passed two arguments: the package name, and +the install directory.") + +(defvar package-delete-hook nil + "*List of hook functions to be called when a package is deleted. The +hook is called *before* the package is deleted. The hook function is passed +two arguments: the package name, and the install directory.") + ;;;###autoload (defun package-admin-add-single-file-package (file destdir &optional pkg-dir) "Install a single file Lisp package into XEmacs package hierarchy. @@ -402,6 +412,7 @@ (let ( (tmpbuf " *pkg-manifest*") manifest-file package-lispdir dirs file) (setq pkg-topdir (package-admin-get-install-dir package pkg-topdir)) (setq manifest-file (package-admin-get-manifest-file pkg-topdir package)) + (run-hook-with-args 'package-delete-hook package pkg-topdir) (if (file-exists-p manifest-file) (progn ;; The manifest file exists! Use it to delete the old distribution.
--- a/lisp/package-get.el Thu Jul 12 06:29:10 2001 +0000 +++ b/lisp/package-get.el Sat Jul 14 08:42:17 2001 +0000 @@ -865,6 +865,7 @@ (if (package-get-init-package (package-admin-get-lispdir install-dir package)) (progn + (run-hook-with-args 'package-install-hook package install-dir) (message "Added package `%s'" package) (sit-for 0) )