Mercurial > hg > xemacs-beta
comparison lisp/package-get.el @ 824:0cce4fee510b
[xemacs-hg @ 2002-05-01 08:25:40 by youngs]
2002-05-01 Steve Youngs <youngs@xemacs.org>
* package-get.el (package-get-update-base-entry): Remove code to
add package entries into custom.
(package-get-custom-groups): Remove.
(package-get-custom): Ditto.
(package-get-custom-add-entry): Ditto.
2002-04-29 Steve Youngs <youngs@xemacs.org>
* menubar-items.el (default-menubar): Remove entry for managing
packages via custom.
2002-05-01 Steve Youngs <youngs@xemacs.org>
* xemacs/packages.texi (Automatically): Don't mention "Options"
menu.
(Installing Packages): Don't mention getting list of packages via
customize.
author | youngs |
---|---|
date | Wed, 01 May 2002 08:25:52 +0000 |
parents | e38acbeb1cae |
children | eb3bc15a6e0f |
comparison
equal
deleted
inserted
replaced
823:4f043f6069e3 | 824:0cce4fee510b |
---|---|
335 (defun package-get-update-base-entry (entry) | 335 (defun package-get-update-base-entry (entry) |
336 "Update an entry in `package-get-base'." | 336 "Update an entry in `package-get-base'." |
337 (let ((existing (assq (car entry) package-get-base))) | 337 (let ((existing (assq (car entry) package-get-base))) |
338 (if existing | 338 (if existing |
339 (setcdr existing (cdr entry)) | 339 (setcdr existing (cdr entry)) |
340 (setq package-get-base (cons entry package-get-base)) | 340 (setq package-get-base (cons entry package-get-base))))) |
341 (package-get-custom-add-entry (car entry) (car (cdr entry)))))) | |
342 | 341 |
343 (defun package-get-locate-file (file &optional nil-if-not-found no-remote) | 342 (defun package-get-locate-file (file &optional nil-if-not-found no-remote) |
344 "Locate an existing FILE with respect to `package-get-remote'. | 343 "Locate an existing FILE with respect to `package-get-remote'. |
345 If FILE is an absolute path or is not found, simply return FILE. | 344 If FILE is an absolute path or is not found, simply return FILE. |
346 If optional argument NIL-IF-NOT-FOUND is non-nil, return nil | 345 If optional argument NIL-IF-NOT-FOUND is non-nil, return nil |
1042 (if found | 1041 (if found |
1043 (message "%S" found) | 1042 (message "%S" found) |
1044 (message "No appropriate package found"))) | 1043 (message "No appropriate package found"))) |
1045 found)) | 1044 found)) |
1046 | 1045 |
1047 ;; | |
1048 ;; customize interfaces. | |
1049 ;; The group is in this file so that custom loads includes this file. | |
1050 ;; | |
1051 (defgroup packages nil | |
1052 "Configure XEmacs packages." | |
1053 :group 'emacs) | |
1054 | |
1055 ;;;###autoload | |
1056 (defun package-get-custom () | |
1057 "Fetch and install the latest versions of all customized packages." | |
1058 (interactive) | |
1059 (package-get-require-base t) | |
1060 (mapcar (lambda (pkg) | |
1061 (if (eval (intern (concat (symbol-name (car pkg)) "-package"))) | |
1062 (package-get (car pkg) nil)) | |
1063 t) | |
1064 package-get-base) | |
1065 (package-net-update-installed-db)) | |
1066 | |
1067 (defun package-get-ever-installed-p (pkg &optional notused) | 1046 (defun package-get-ever-installed-p (pkg &optional notused) |
1068 (string-match "-package$" (symbol-name pkg)) | 1047 (string-match "-package$" (symbol-name pkg)) |
1069 (custom-initialize-set | 1048 (custom-initialize-set |
1070 pkg | 1049 pkg |
1071 (if (package-get-info-find-package | 1050 (if (package-get-info-find-package |
1072 packages-package-list | 1051 packages-package-list |
1073 (intern (substring (symbol-name pkg) 0 (match-beginning 0)))) | 1052 (intern (substring (symbol-name pkg) 0 (match-beginning 0)))) |
1074 t))) | 1053 t))) |
1075 | 1054 |
1076 (defvar package-get-custom-groups nil | |
1077 "List of package-get-custom groups") | |
1078 | |
1079 (defun package-get-custom-add-entry (package props) | |
1080 (let* ((category (plist-get props 'category)) | |
1081 (group (intern (concat category "-packages"))) | |
1082 (custom-var (intern (concat (symbol-name package) "-package"))) | |
1083 (description (plist-get props 'description))) | |
1084 (when (not (memq group package-get-custom-groups)) | |
1085 (setq package-get-custom-groups (cons group | |
1086 package-get-custom-groups)) | |
1087 (eval `(defgroup ,group nil | |
1088 ,(concat category " package group") | |
1089 :group 'packages))) | |
1090 (eval `(defcustom ,custom-var nil | |
1091 ,description | |
1092 :group ',group | |
1093 :initialize 'package-get-ever-installed-p | |
1094 :type 'boolean)))) | |
1095 | |
1096 | 1055 |
1097 (provide 'package-get) | 1056 (provide 'package-get) |
1098 ;;; package-get.el ends here | 1057 ;;; package-get.el ends here |