diff lisp/packages.el @ 2557:8dc793d1d990

[xemacs-hg @ 2005-02-03 23:56:52 by ben] last part of behavior patch packages.el: Add actual command to suppress packages.
author ben
date Thu, 03 Feb 2005 23:56:53 +0000
parents 505a24c07ba9
children 15139dbf89f4
line wrap: on
line diff
--- a/lisp/packages.el	Thu Feb 03 22:51:29 2005 +0000
+++ b/lisp/packages.el	Thu Feb 03 23:56:53 2005 +0000
@@ -1,7 +1,7 @@
 ;;; packages.el --- Low level support for XEmacs packages
 
 ;; Copyright (C) 1997 Free Software Foundation, Inc.
-;; Copyright (C) 2002, 2003 Ben Wing.
+;; Copyright (C) 2002, 2003, 2004 Ben Wing.
 
 ;; Author: Steven L Baur <steve@xemacs.org>
 ;; Maintainer: Steven L Baur <steve@xemacs.org>
@@ -133,6 +133,14 @@
     (setq packages-package-list
 	  (cons (cons name info) (remassq name packages-package-list)))))
 
+(defun package-suppress (package file form)
+  "Set up a package-suppress condition FORM for FILE in PACKAGE.
+When XEmacs searches for a file in the load path, it will ignore FILE
+if FORM evaluates to non-nil."
+  (setq load-suppress-alist
+	(acons (expand-file-name file load-file-name) form
+	       load-suppress-alist)))
+
 (defun package-require (name version)
   (let ((pkg (assq name packages-package-list)))
     (cond ((null pkg)