annotate lisp/package-ui.el @ 2621:a5158a1f89a4

[xemacs-hg @ 2005-02-28 22:51:03 by viteno] Update xemacs_extra_name.
author viteno
date Mon, 28 Feb 2005 22:51:03 +0000
parents 2f5d53e62972
children e29fcfd8df5f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 ;;; package-ui.el ---
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3 ;; Copyright (C) 1998 by Darryl Okahata
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5 ;; Author: Darryl Okahata <darrylo@sr.hp.com>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6 ;; Keywords: internal
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 ;; This file is part of XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10 ;; XEmacs is free software; you can redistribute it and/or modify it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11 ;; under the terms of the GNU General Public License as published by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 ;; the Free Software Foundation; either version 2, or (at your option)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 ;; any later version.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15 ;; XEmacs is distributed in the hope that it will be useful, but
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 ;; General Public License for more details.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20 ;; You should have received a copy of the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21 ;; along with XEmacs; see the file COPYING. If not, write to the Free
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23 ;; 02111-1307, USA.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 ;;; Synched up with: Not in FSF
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 (require 'package-get) ;; which, in turn, requires 'package-admin
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 ;; User-changeable variables:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33 (defgroup pui nil
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
34 "Convenient interface to the package system."
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 :group 'package-tools
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36 :tag "Package User interface"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 :prefix "pui-")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39 (defcustom pui-package-install-dest-dir nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 "*If non-nil (Automatic) path to package tree to install packages in.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 Otherwise, use old path for installed packages and make a guess for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 new ones."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 :group 'pui
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 :tag "Install Location"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 :type '(choice (const :tag "Automatic" nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 (directory)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 (defcustom pui-list-verbose t
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 "*If non-nil, display verbose info in the package list buffer."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 :group 'pui
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 :tag "Verbose Listing"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 :type 'boolean)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54 (defcustom pui-up-to-date-package-face nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 "*The face to use for packages that are up-to-date."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56 :group 'pui
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57 :type 'face)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 (defcustom pui-selected-package-face 'bold
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60 "*The face to use for selected packages.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61 Set this to `nil' to use the `default' face."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 :group 'pui
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 :type 'face)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 (defcustom pui-deleted-package-face 'blue
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66 "*The face to use for packages marked for removal.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67 Set this to `nil' to use the `default' face."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 :group 'pui
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 :type 'face)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 (defcustom pui-outdated-package-face 'red
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 "*The face to use for outdated packages.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 Set this to `nil' to use the `default' face."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 :group 'pui
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75 :type 'face)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 (defcustom pui-uninstalled-package-face 'italic
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 "*The face to use for uninstalled packages.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79 Set this to `nil' to use the `default' face."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 :group 'pui
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 :type 'face)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82
1365
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
83 (defcustom pui-info-buffer "*Packages*"
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
84 "*Buffer to use for displaying package information."
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
85 :group 'pui
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
86 :type 'string)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 ;; End of user-changeable variables.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 (defvar pui-selected-packages nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93 "The list of user-selected packages to install.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 (defvar pui-deleted-packages nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96 "The list of user-selected packages to remove.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 (defvar pui-actual-package "")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 (defvar pui-display-keymap
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 (let ((m (make-keymap)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 (suppress-keymap m)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103 (set-keymap-name m 'pui-display-keymap)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 (define-key m "q" 'pui-quit)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105 (define-key m "g" 'pui-list-packages)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106 (define-key m "i" 'pui-display-info)
1742
7f92ee59c996 [xemacs-hg @ 2003-10-13 18:53:23 by viteno]
viteno
parents: 1647
diff changeset
107 (define-key m "m" 'pui-display-maintainer)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 (define-key m "?" 'describe-mode)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109 (define-key m "v" 'pui-toggle-verbosity-redisplay)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
110 (define-key m "d" 'pui-toggle-package-delete-key)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111 (define-key m "D" 'pui-toggle-package-delete-key)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112 (define-key m [return] 'pui-toggle-package-key)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 (define-key m "x" 'pui-install-selected-packages)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114 (define-key m "I" 'pui-install-selected-packages)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 (define-key m "r" 'pui-add-required-packages)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116 (define-key m "n" 'next-line)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117 (define-key m "+" 'pui-toggle-package-key)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118 (define-key m "p" 'previous-line)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119 (define-key m " " 'scroll-up-command)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120 (define-key m [delete] 'scroll-down-command)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121 m)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122 "Keymap to use in the `pui-info-buffer' buffer")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 (defvar pui-package-keymap
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125 (let ((m (make-sparse-keymap)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 (set-keymap-name m 'pui-package-keymap)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127 (define-key m 'button2 'pui-toggle-package-event)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128 ;; We use a popup menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129 (define-key m 'button3 'pui-popup-context-sensitive)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130 m)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131 "Keymap to use over package names/descriptions.")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
133 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134 ;; End of variables
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
135
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
136
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
137 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
138 ;; Configuration routines
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
139
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
140 ;;;###autoload
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
141 (defun package-ui-add-site (site)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
142 "Add site to package-get-remote and possibly offer to update package list."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
143 (let ((had-none (null package-get-remote)))
1365
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
144 (setq package-get-remote site)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145 (when (and had-none package-get-was-current
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
146 (y-or-n-p "Update Package list?"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
147 (setq package-get-was-current nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148 (package-get-require-base t)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
149 (if (get-buffer pui-info-buffer)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150 (save-window-excursion
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151 (pui-list-packages))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
152 (set-menubar-dirty-flag)))
1365
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
153
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
154 ;;;###autoload
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
155 (defun package-ui-download-menu ()
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
156 "Build the `Add Download Site' menu."
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
157 (mapcar (lambda (site)
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
158 (vector (car site)
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
159 `(if (equal package-get-remote (quote ,(cdr site)))
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
160 (setq package-get-remote nil)
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
161 (package-ui-add-site (quote ,(cdr site))))
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
162 ;; I've used radio buttons so that only a single
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
163 ;; site can be selected, but they are in fact
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
164 ;; toggles. SY.
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
165 :style 'radio
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
166 :selected `(equal package-get-remote (quote ,(cdr site)))))
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
167 package-get-download-sites))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
168
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
169 ;;;###autoload
1365
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
170 (defun package-ui-pre-release-download-menu ()
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
171 "Build the 'Pre-Release Download Sites' menu."
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
172 (mapcar (lambda (site)
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
173 (vector (car site)
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
174 `(if (equal package-get-remote (quote ,(cdr site)))
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
175 (setq package-get-remote nil)
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
176 (package-ui-add-site (quote ,(cdr site))))
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
177 ;; I've used radio buttons so that only a single
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
178 ;; site can be selected, but they are in fact
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
179 ;; toggles. SY.
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
180 :style 'radio
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
181 :selected `(equal package-get-remote (quote ,(cdr site)))))
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
182 package-get-pre-release-download-sites))
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
183
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
184 ;;;###autoload
1374
d638fc15d68b [xemacs-hg @ 2003-03-24 11:10:54 by adrian]
adrian
parents: 1365
diff changeset
185 (defun package-ui-site-release-download-menu ()
d638fc15d68b [xemacs-hg @ 2003-03-24 11:10:54 by adrian]
adrian
parents: 1365
diff changeset
186 "Build the 'Site Release Download Sites' menu."
d638fc15d68b [xemacs-hg @ 2003-03-24 11:10:54 by adrian]
adrian
parents: 1365
diff changeset
187 (mapcar (lambda (site)
d638fc15d68b [xemacs-hg @ 2003-03-24 11:10:54 by adrian]
adrian
parents: 1365
diff changeset
188 (vector (car site)
d638fc15d68b [xemacs-hg @ 2003-03-24 11:10:54 by adrian]
adrian
parents: 1365
diff changeset
189 `(if (equal package-get-remote (quote ,(cdr site)))
d638fc15d68b [xemacs-hg @ 2003-03-24 11:10:54 by adrian]
adrian
parents: 1365
diff changeset
190 (setq package-get-remote nil)
d638fc15d68b [xemacs-hg @ 2003-03-24 11:10:54 by adrian]
adrian
parents: 1365
diff changeset
191 (package-ui-add-site (quote ,(cdr site))))
d638fc15d68b [xemacs-hg @ 2003-03-24 11:10:54 by adrian]
adrian
parents: 1365
diff changeset
192 ;; I've used radio buttons so that only a single
d638fc15d68b [xemacs-hg @ 2003-03-24 11:10:54 by adrian]
adrian
parents: 1365
diff changeset
193 ;; site can be selected, but they are in fact
d638fc15d68b [xemacs-hg @ 2003-03-24 11:10:54 by adrian]
adrian
parents: 1365
diff changeset
194 ;; toggles. SY.
d638fc15d68b [xemacs-hg @ 2003-03-24 11:10:54 by adrian]
adrian
parents: 1365
diff changeset
195 :style 'radio
d638fc15d68b [xemacs-hg @ 2003-03-24 11:10:54 by adrian]
adrian
parents: 1365
diff changeset
196 :selected `(equal package-get-remote (quote ,(cdr site)))))
d638fc15d68b [xemacs-hg @ 2003-03-24 11:10:54 by adrian]
adrian
parents: 1365
diff changeset
197 package-get-site-release-download-sites))
d638fc15d68b [xemacs-hg @ 2003-03-24 11:10:54 by adrian]
adrian
parents: 1365
diff changeset
198
d638fc15d68b [xemacs-hg @ 2003-03-24 11:10:54 by adrian]
adrian
parents: 1365
diff changeset
199 ;;;###autoload
1647
d90ba01b5346 [xemacs-hg @ 2003-08-27 17:18:20 by youngs]
youngs
parents: 1410
diff changeset
200 (defun pui-set-local-package-get-directory ()
1365
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
201 "Set a new package binary directory in `package-get-remote'.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
202 Note that no provision is made for saving any changes made by this function.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
203 It exists mainly as a convenience for one-time package installations from
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204 disk."
1365
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
205 (interactive)
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
206 (let ((dir (read-directory-name
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
207 "New package binary directory to add? "
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
208 nil nil t)))
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
209 (setq package-get-remote (list nil dir))
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
210 (message "Package directory \"%s\" added." dir)))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
211
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
212 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
213 ;; Package list/installer routines
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
214
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
215 (defun pui-quit ()
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
216 (interactive)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
217 (kill-buffer nil))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
218
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
219 (defun pui-package-symbol-char (pkg-sym version)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
220 (progn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
221 (if (package-get-info-find-package packages-package-list pkg-sym)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
222 (let ((installed (package-get-key pkg-sym :version)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
223 (if (>= (if (stringp installed)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
224 (string-to-number installed)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
225 installed)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
226 (if (stringp version)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
227 (string-to-number version)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
228 version))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
229 (list " " pui-up-to-date-package-face)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
230 (list "*" pui-outdated-package-face)))
1365
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
231 (list "-" pui-uninstalled-package-face))))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
232
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
233 (defun pui-update-package-display (extent &optional pkg-sym version)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
234 "Update the package status for EXTENT.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
235 If PKG-SYM or VERSION are not given, they are read from the extent.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
236 These are used to determine whether or not the package is installed,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
237 and whether or not it is up-to-date."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
238 (let (buffer-read-only disp sym-char)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
239 (if (not pkg-sym)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
240 (setq pkg-sym (extent-property extent 'pui-package)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
241 (if (not version)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
242 (setq version (package-get-info-prop (extent-property extent 'pui-info)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
243 'version)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
244 (cond ((member pkg-sym pui-selected-packages)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
245 (if pui-selected-package-face
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
246 (set-extent-face extent (get-face pui-selected-package-face))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
247 (set-extent-face extent (get-face 'default)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
248 (setq sym-char "+"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
249 ((member pkg-sym pui-deleted-packages)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
250 (if pui-deleted-package-face
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
251 (set-extent-face extent (get-face pui-deleted-package-face))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
252 (set-extent-face extent (get-face 'default)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
253 (setq sym-char "D"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
254 (t
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
255 (setq disp (pui-package-symbol-char pkg-sym version))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
256 (setq sym-char (car disp))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
257 (if (car (cdr disp))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
258 (set-extent-face extent (get-face (car (cdr disp))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
259 (set-extent-face extent (get-face 'default)))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
260 (save-excursion
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
261 (goto-char (extent-start-position extent))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
262 (delete-char 1)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
263 (insert sym-char)
1365
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
264 (set-buffer-modified-p nil))))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
265
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
266 (defun pui-toggle-package (extent)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
267 (let (pkg-sym)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
268 (setq pkg-sym (extent-property extent 'pui-package))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
269 (if (member pkg-sym pui-selected-packages)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
270 (setq pui-selected-packages
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
271 (delete pkg-sym pui-selected-packages))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
272 (setq pui-selected-packages
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
273 (cons pkg-sym pui-selected-packages))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
274 (setq pui-deleted-packages
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
275 (delete pkg-sym pui-deleted-packages)))
1365
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
276 (pui-update-package-display extent pkg-sym)))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
277
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
278 (defun pui-toggle-package-key ()
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
279 "Select/unselect package for installation, using the keyboard."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
280 (interactive)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
281 (let (extent)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
282 (if (setq extent (extent-at (point) (current-buffer) 'pui))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
283 (progn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
284 (pui-toggle-package extent)
1365
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
285 (forward-line 1))
1410
44de306310b8 [xemacs-hg @ 2003-04-14 03:40:26 by youngs]
youngs
parents: 1378
diff changeset
286 (error 'invalid-operation
44de306310b8 [xemacs-hg @ 2003-04-14 03:40:26 by youngs]
youngs
parents: 1378
diff changeset
287 "No package under cursor!"))))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
288
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
289 (defun pui-toggle-package-delete (extent)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
290 (let (pkg-sym)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
291 (setq pkg-sym (extent-property extent 'pui-package))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
292 (if (member pkg-sym pui-deleted-packages)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
293 (setq pui-deleted-packages
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
294 (delete pkg-sym pui-deleted-packages))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
295 (setq pui-deleted-packages
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
296 (cons pkg-sym pui-deleted-packages))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
297 (setq pui-selected-packages
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
298 (delete pkg-sym pui-selected-packages)))
1365
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
299 (pui-update-package-display extent pkg-sym)))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
300
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
301
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
302 (defun pui-toggle-package-delete-key ()
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
303 "Select/unselect package for removal, using the keyboard."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
304 (interactive)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
305 (let (extent)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
306 (if (setq extent (extent-at (point) (current-buffer) 'pui))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
307 (progn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
308 (pui-toggle-package-delete extent)
1365
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
309 (forward-line 1))
1410
44de306310b8 [xemacs-hg @ 2003-04-14 03:40:26 by youngs]
youngs
parents: 1378
diff changeset
310 (error 'invalid-operation
44de306310b8 [xemacs-hg @ 2003-04-14 03:40:26 by youngs]
youngs
parents: 1378
diff changeset
311 "No package under cursor!"))))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
312
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
313 (defun pui-current-package ()
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
314 (let ((extent (extent-at (point) (current-buffer) 'pui)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
315 (if extent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
316 (extent-property extent 'pui-package))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
317
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
318 (defun pui-toggle-package-event (event)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
319 "Select/unselect package for installation, using the mouse."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
320 (interactive "e")
1365
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
321 (let* ((ep (event-point event))
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
322 (buffer (window-buffer (event-window event)))
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
323 (extent (extent-at ep buffer 'pui-package)))
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
324 (pui-toggle-package extent)))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
325
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
326 (defun pui-toggle-verbosity-redisplay ()
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
327 "Toggle verbose package info."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
328 (interactive)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
329 (progn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
330 (setq pui-list-verbose (not pui-list-verbose))
1365
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
331 (pui-list-packages)))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
332
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
333 (defun pui-install-selected-packages ()
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
334 "Install selected packages."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
335 (interactive)
1365
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
336 (let ((tmpbuf "*Packages-To-Remove*")
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
337 do-delete)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
338 (when pui-deleted-packages
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
339 (save-window-excursion
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
340 (with-output-to-temp-buffer tmpbuf
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
341 (display-completion-list (sort
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
342 (mapcar #'symbol-name pui-deleted-packages)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
343 #'string<)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
344 :activate-callback nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
345 :help-string "Packages selected for removal:\n"
1365
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
346 :completion-string t))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
347 (setq tmpbuf (get-buffer-create tmpbuf))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
348 (display-buffer tmpbuf)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
349 (setq do-delete (yes-or-no-p "Remove these packages? "))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
350 (kill-buffer tmpbuf))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
351 (when do-delete
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
352 (message "Deleting selected packages ...") (sit-for 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
353 (mapcar (lambda (pkg)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
354 (package-admin-delete-binary-package
1378
69a674f5861f [xemacs-hg @ 2003-03-24 16:30:55 by youngs]
youngs
parents: 1374
diff changeset
355 pkg (package-admin-get-install-dir pkg)))
624
59c2a61efa7d [xemacs-hg @ 2001-06-30 23:07:06 by youngs]
youngs
parents: 454
diff changeset
356 (nreverse pui-deleted-packages))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
357 (message "Packages deleted"))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
358
1365
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
359 (let ((tmpbuf "*Packages-To-Install*")
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
360 do-install)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
361 (if pui-selected-packages
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
362 (progn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
363 ;; Don't change window config when asking the user if he really
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
364 ;; wants to install the packages. We do this to avoid messing up
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
365 ;; the window configuration if errors occur (we don't want to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
366 ;; display random buffers in addition to the error buffer, if
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
367 ;; errors occur, which would normally be caused by display-buffer).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
368 (save-window-excursion
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
369 (with-output-to-temp-buffer tmpbuf
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
370 (display-completion-list
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
371 (sort (mapcar #'symbol-name pui-selected-packages) #'string<)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
372 :activate-callback nil
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
373 :help-string "Packages selected for installation:\n"
1365
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
374 :completion-string t))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
375 (setq tmpbuf (get-buffer-create tmpbuf))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
376 (display-buffer tmpbuf)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
377 (setq do-install (y-or-n-p "Install these packages? "))
1365
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
378 (kill-buffer tmpbuf))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
379 (if do-install
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
380 (progn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
381 (save-excursion
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
382 ;; Clear old temp buffer history
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
383 (set-buffer (get-buffer-create package-admin-temp-buffer))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
384 (buffer-disable-undo package-admin-temp-buffer)
1365
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
385 (erase-buffer package-admin-temp-buffer))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
386 (message "Installing selected packages ...") (sit-for 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
387 (if (catch 'done
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
388 (mapcar (lambda (pkg)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
389 (if (not (package-get pkg nil nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
390 pui-package-install-dest-dir))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
391 (throw 'done nil)))
624
59c2a61efa7d [xemacs-hg @ 2001-06-30 23:07:06 by youngs]
youngs
parents: 454
diff changeset
392 (nreverse pui-selected-packages))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
393 t)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
394 (progn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
395 (pui-list-packages)
1365
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
396 (message "Packages installed"))))
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
397 (clear-message)))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
398 (if pui-deleted-packages
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
399 (pui-list-packages)
1410
44de306310b8 [xemacs-hg @ 2003-04-14 03:40:26 by youngs]
youngs
parents: 1378
diff changeset
400 (error 'invalid-operation
44de306310b8 [xemacs-hg @ 2003-04-14 03:40:26 by youngs]
youngs
parents: 1378
diff changeset
401 "No packages have been selected!")))
454
d7a9135ec789 Import from CVS: tag r21-2-42
cvs
parents: 442
diff changeset
402 ;; sync with windows type systems
1365
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
403 (package-net-update-installed-db)))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
404
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
405 (defun pui-add-required-packages ()
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
406 "Select packages required by those already selected for installation."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
407 (interactive)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
408 (let ((tmpbuf "*Required-Packages*") do-select)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
409 (if pui-selected-packages
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
410 (let ((dependencies
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
411 (delq nil (mapcar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
412 (lambda (pkg)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
413 (let ((installed
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
414 (package-get-key pkg :version))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
415 (current
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
416 (package-get-info-prop
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
417 (package-get-info-version
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
418 (package-get-info-find-package
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
419 package-get-base pkg) nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
420 'version)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
421 (if (or (null installed)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
422 (< (if (stringp installed)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
423 (string-to-number installed)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
424 installed)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
425 (if (stringp current)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
426 (string-to-number current)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
427 current)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
428 pkg
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
429 nil)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
430 (package-get-dependencies pui-selected-packages)))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
431 ;; Don't change window config when asking the user if he really
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
432 ;; wants to add the packages. We do this to avoid messing up
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
433 ;; the window configuration if errors occur (we don't want to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
434 ;; display random buffers in addition to the error buffer, if
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
435 ;; errors occur, which would normally be caused by display-buffer).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
436 (save-window-excursion
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
437 (with-output-to-temp-buffer tmpbuf
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
438 (display-completion-list (sort
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
439 (mapcar #'(lambda (pkg)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
440 (symbol-name pkg))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
441 dependencies)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
442 'string<)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
443 :activate-callback nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
444 :help-string "Required packages:\n"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
445 :completion-string t))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
446 (setq tmpbuf (get-buffer-create tmpbuf))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
447 (display-buffer tmpbuf)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
448 (setq do-select (y-or-n-p "Select these packages? "))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
449 (kill-buffer tmpbuf))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
450 (if do-select
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
451 (progn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
452 (setq pui-selected-packages
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
453 (union pui-selected-packages dependencies))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
454 (map-extents #'(lambda (extent maparg)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
455 (pui-update-package-display extent))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
456 nil nil nil nil nil 'pui)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
457 (message "added dependencies"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
458 (clear-message)))
1410
44de306310b8 [xemacs-hg @ 2003-04-14 03:40:26 by youngs]
youngs
parents: 1378
diff changeset
459 (error 'invalid-operation
44de306310b8 [xemacs-hg @ 2003-04-14 03:40:26 by youngs]
youngs
parents: 1378
diff changeset
460 "No packages have been selected!"))))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
461
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
462 (defun pui-help-echo (extent &optional force-update)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
463 "Display additional package info in the modeline.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
464 EXTENT determines the package to display (the package information is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
465 attached to the extent as properties)."
1742
7f92ee59c996 [xemacs-hg @ 2003-10-13 18:53:23 by viteno]
viteno
parents: 1647
diff changeset
466 (let (pkg-sym info inst-ver inst-auth-ver auth-ver date maintainer balloon req)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
467 (if (or force-update (not (current-message))
1365
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
468 (string-match ".*: .*: " (current-message)))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
469 (progn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
470 (setq pkg-sym (extent-property extent 'pui-package)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
471 info (extent-property extent 'pui-info)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
472 inst-ver (package-get-key pkg-sym :version)
1742
7f92ee59c996 [xemacs-hg @ 2003-10-13 18:53:23 by viteno]
viteno
parents: 1647
diff changeset
473 inst-auth-ver (package-get-key pkg-sym :author-version)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
474 auth-ver (package-get-info-prop info 'author-version)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
475 date (package-get-info-prop info 'date)
852
d83885ef293b [xemacs-hg @ 2002-05-25 01:55:29 by youngs]
youngs
parents: 624
diff changeset
476 maintainer (package-get-info-prop info 'maintainer)
d83885ef293b [xemacs-hg @ 2002-05-25 01:55:29 by youngs]
youngs
parents: 624
diff changeset
477 req (package-get-info-prop info 'requires))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
478 (if (not inst-ver)
852
d83885ef293b [xemacs-hg @ 2002-05-25 01:55:29 by youngs]
youngs
parents: 624
diff changeset
479 (setq inst-ver 0))
d83885ef293b [xemacs-hg @ 2002-05-25 01:55:29 by youngs]
youngs
parents: 624
diff changeset
480 (if (featurep 'balloon-help)
d83885ef293b [xemacs-hg @ 2002-05-25 01:55:29 by youngs]
youngs
parents: 624
diff changeset
481 (progn
d83885ef293b [xemacs-hg @ 2002-05-25 01:55:29 by youngs]
youngs
parents: 624
diff changeset
482 (setq balloon (format "
2146
e4307a6b9ebb [xemacs-hg @ 2004-06-21 18:26:18 by adrian]
adrian
parents: 1742
diff changeset
483 Package Information: [For package: \"%s\"]\n================
1742
7f92ee59c996 [xemacs-hg @ 2003-10-13 18:53:23 by viteno]
viteno
parents: 1647
diff changeset
484 Installed Upstream Ver: %s Available Upstream Ver: %s
852
d83885ef293b [xemacs-hg @ 2002-05-25 01:55:29 by youngs]
youngs
parents: 624
diff changeset
485 Maintainer : %s
d83885ef293b [xemacs-hg @ 2002-05-25 01:55:29 by youngs]
youngs
parents: 624
diff changeset
486 Released : %s
d83885ef293b [xemacs-hg @ 2002-05-25 01:55:29 by youngs]
youngs
parents: 624
diff changeset
487 Required Packages : %s\n\n"
1742
7f92ee59c996 [xemacs-hg @ 2003-10-13 18:53:23 by viteno]
viteno
parents: 1647
diff changeset
488 pkg-sym inst-auth-ver auth-ver maintainer
852
d83885ef293b [xemacs-hg @ 2002-05-25 01:55:29 by youngs]
youngs
parents: 624
diff changeset
489 date req))
d83885ef293b [xemacs-hg @ 2002-05-25 01:55:29 by youngs]
youngs
parents: 624
diff changeset
490 (set-extent-property extent 'balloon-help balloon)))
1742
7f92ee59c996 [xemacs-hg @ 2003-10-13 18:53:23 by viteno]
viteno
parents: 1647
diff changeset
491 (format
7f92ee59c996 [xemacs-hg @ 2003-10-13 18:53:23 by viteno]
viteno
parents: 1647
diff changeset
492 "Installed upstream ver: %s Available upstream ver: %s"
7f92ee59c996 [xemacs-hg @ 2003-10-13 18:53:23 by viteno]
viteno
parents: 1647
diff changeset
493 inst-auth-ver auth-ver)))))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
494
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
495 (defun pui-display-info (&optional no-error event)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
496 "Display additional package info in the modeline.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
497 Designed to be called interactively (from a keypress)."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
498 (interactive)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
499 (let (extent)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
500 (save-excursion
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
501 (beginning-of-line)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
502 (if (setq extent (extent-at (point) (current-buffer) 'pui))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
503 (message (pui-help-echo extent t))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
504 (if no-error
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
505 (clear-message nil)
1410
44de306310b8 [xemacs-hg @ 2003-04-14 03:40:26 by youngs]
youngs
parents: 1378
diff changeset
506 (error 'invalid-operation
44de306310b8 [xemacs-hg @ 2003-04-14 03:40:26 by youngs]
youngs
parents: 1378
diff changeset
507 "No package under cursor!"))))))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
508
1742
7f92ee59c996 [xemacs-hg @ 2003-10-13 18:53:23 by viteno]
viteno
parents: 1647
diff changeset
509 (defun pui-display-maintainer (&optional no-error event)
7f92ee59c996 [xemacs-hg @ 2003-10-13 18:53:23 by viteno]
viteno
parents: 1647
diff changeset
510 "Display a package's maintainer in the minibuffer."
7f92ee59c996 [xemacs-hg @ 2003-10-13 18:53:23 by viteno]
viteno
parents: 1647
diff changeset
511 (interactive)
2367
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 2146
diff changeset
512 (let (extent ;pkg-sym
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 2146
diff changeset
513 info maintainer)
1742
7f92ee59c996 [xemacs-hg @ 2003-10-13 18:53:23 by viteno]
viteno
parents: 1647
diff changeset
514 (save-excursion
7f92ee59c996 [xemacs-hg @ 2003-10-13 18:53:23 by viteno]
viteno
parents: 1647
diff changeset
515 (beginning-of-line)
7f92ee59c996 [xemacs-hg @ 2003-10-13 18:53:23 by viteno]
viteno
parents: 1647
diff changeset
516 (if (setq extent (extent-at (point) (current-buffer) 'pui))
7f92ee59c996 [xemacs-hg @ 2003-10-13 18:53:23 by viteno]
viteno
parents: 1647
diff changeset
517 (progn
2367
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 2146
diff changeset
518 (setq ;pkg-sym (extent-property extent 'pui-package)
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 2146
diff changeset
519 info (extent-property extent 'pui-info)
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 2146
diff changeset
520 maintainer (package-get-info-prop info 'maintainer))
1742
7f92ee59c996 [xemacs-hg @ 2003-10-13 18:53:23 by viteno]
viteno
parents: 1647
diff changeset
521 (message (format "Maintainer: %s" maintainer)))
7f92ee59c996 [xemacs-hg @ 2003-10-13 18:53:23 by viteno]
viteno
parents: 1647
diff changeset
522 (if no-error
7f92ee59c996 [xemacs-hg @ 2003-10-13 18:53:23 by viteno]
viteno
parents: 1647
diff changeset
523 (clear-message nil)
7f92ee59c996 [xemacs-hg @ 2003-10-13 18:53:23 by viteno]
viteno
parents: 1647
diff changeset
524 (error 'invalid-operation
7f92ee59c996 [xemacs-hg @ 2003-10-13 18:53:23 by viteno]
viteno
parents: 1647
diff changeset
525 "No package under cursor!"))))))
7f92ee59c996 [xemacs-hg @ 2003-10-13 18:53:23 by viteno]
viteno
parents: 1647
diff changeset
526
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
527 (defvar pui-menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
528 '("Packages"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
529 ["Toggle install " pui-toggle-package-key :active (pui-current-package) :suffix (format "`%s'" (or (pui-current-package) "..."))]
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
530 ["Toggle delete " pui-toggle-package-delete-key :active (pui-current-package) :suffix (format "`%s'" (or (pui-current-package) "..."))]
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
531 ["Info on" pui-display-info :active (pui-current-package) :suffix (format "`%s'" (or (pui-current-package) "..."))]
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
532 "---"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
533 ["Add Required" pui-add-required-packages t]
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
534 ["Install/Remove Selected" pui-install-selected-packages t]
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
535 "---"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
536 ["Verbose" pui-toggle-verbosity-redisplay
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
537 :active t :style toggle :selected pui-list-verbose]
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
538 ["Refresh" pui-list-packages t]
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
539 ["Help" pui-help t]
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
540 ["Quit" pui-quit t]))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
541
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
542 ;;; "Why is there no standard function to do this?"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
543 (defun pui-popup-context-sensitive (event)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
544 (interactive "e")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
545 (save-excursion
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
546 (set-buffer (event-buffer event))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
547 (goto-char (event-point event))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
548 (popup-menu pui-menu event)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
549 ;; I agree with dired.el - this is seriously bogus.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
550 (while (popup-up-p)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
551 (dispatch-event (next-event)))))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
552
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
553 (defun list-packages-mode ()
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
554 "Symbols in the leftmost column:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
555
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
556 + The package is marked for installation.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
557 - The package has not been installed.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
558 D The package has been marked for deletion.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
559 * The currently installed package is old, and a newer version is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
560 available.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
561
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
562 Useful keys:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
563
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
564 `\\[pui-toggle-package-key]' to select/unselect the current package for installation.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
565 `\\[pui-toggle-package-delete-key]' to select/unselect the current package for removal.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
566 `\\[pui-add-required-packages]' to add any packages required by those selected.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
567 `\\[pui-install-selected-packages]' to install/delete selected packages.
1742
7f92ee59c996 [xemacs-hg @ 2003-10-13 18:53:23 by viteno]
viteno
parents: 1647
diff changeset
568 `\\[pui-display-info]' to display additional information about the package in the minibuffer.
7f92ee59c996 [xemacs-hg @ 2003-10-13 18:53:23 by viteno]
viteno
parents: 1647
diff changeset
569 `\\[pui-display-maintainer]' to display the package's maintainer in the minibuffer
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
570 `\\[pui-list-packages]' to refresh the package list.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
571 `\\[pui-toggle-verbosity-redisplay]' to toggle between a verbose and non-verbose display.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
572 `\\[pui-quit]' to kill this buffer.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
573 "
1410
44de306310b8 [xemacs-hg @ 2003-04-14 03:40:26 by youngs]
youngs
parents: 1378
diff changeset
574 (error 'invalid-operation
44de306310b8 [xemacs-hg @ 2003-04-14 03:40:26 by youngs]
youngs
parents: 1378
diff changeset
575 "You cannot enter this mode directly. Use `pui-list-packages'"))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
576
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
577 (put 'list-packages-mode 'mode-class 'special)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
578
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
579 ;;;###autoload
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
580 (defun pui-list-packages ()
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
581 "List all packages and package information.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
582 The package name, version, and description are displayed. From the displayed
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
583 buffer, the user can see which packages are installed, which are not, and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
584 which are out-of-date (a newer version is available). The user can then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
585 select packages for installation via the keyboard or mouse."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
586 (interactive)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
587 (package-get-require-base t)
1365
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
588 (let ((outbuf (get-buffer-create pui-info-buffer))
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
589 (sep-string "===============================================================================\n")
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
590 start)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
591 (message "Creating package list ...") (sit-for 0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
592 (set-buffer outbuf)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
593 (setq buffer-read-only nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
594 (buffer-disable-undo outbuf)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
595 (erase-buffer outbuf)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
596 (kill-all-local-variables)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
597 (use-local-map pui-display-keymap)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
598 (setq major-mode 'list-packages-mode)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
599 (setq mode-name "Packages")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
600 (setq truncate-lines t)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
601
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
602 (unless package-get-remote
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
603 (insert "
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
604 Warning: No download sites specified. Package index may be out of date.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
605 If you intend to install packages, specify download sites first.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
606
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
607 "))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
608
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
609 (if pui-list-verbose
2598
2f5d53e62972 [xemacs-hg @ 2005-02-19 22:25:12 by viteno]
viteno
parents: 2367
diff changeset
610 (insert " Latest Installed
2f5d53e62972 [xemacs-hg @ 2005-02-19 22:25:12 by viteno]
viteno
parents: 2367
diff changeset
611 Package name Vers. Vers. Description
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
612 ")
2598
2f5d53e62972 [xemacs-hg @ 2005-02-19 22:25:12 by viteno]
viteno
parents: 2367
diff changeset
613 (insert " Latest
2f5d53e62972 [xemacs-hg @ 2005-02-19 22:25:12 by viteno]
viteno
parents: 2367
diff changeset
614 Package name Vers. Description
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
615 "))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
616 (insert sep-string)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
617 (setq start (point))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
618 (mapcar
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
619 #'(lambda (pkg)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
620 (let (pkg-sym info version desc
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
621 b e extent current-vers disp)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
622 (setq pkg-sym (car pkg)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
623 info (package-get-info-version (cdr pkg) nil))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
624 (setq version (package-get-info-prop info 'version)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
625 desc (package-get-info-prop info 'description))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
626
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
627 (setq disp (pui-package-symbol-char pkg-sym
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
628 version))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
629 (setq b (point))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
630 (if pui-list-verbose
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
631 (progn
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
632 (setq current-vers (package-get-key pkg-sym :version))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
633 (cond
1365
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
634 ((not current-vers)
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
635 (setq current-vers "-----"))
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
636 ((stringp current-vers)
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
637 (setq current-vers
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
638 (format "%.2f"
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
639 (string-to-number current-vers))))
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
640 ((numberp current-vers)
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
641 (setq current-vers (format "%.2f" current-vers))))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
642 (insert
2598
2f5d53e62972 [xemacs-hg @ 2005-02-19 22:25:12 by viteno]
viteno
parents: 2367
diff changeset
643 (format "%s %-20s %-5.2f %-5s %s\n"
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
644 (car disp) pkg-sym
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
645 (if (stringp version)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
646 (string-to-number version)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
647 version)
1365
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
648 current-vers desc)))
2598
2f5d53e62972 [xemacs-hg @ 2005-02-19 22:25:12 by viteno]
viteno
parents: 2367
diff changeset
649 (insert (format "%s %-20s %-5s %s\n"
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
650 (car disp)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
651 pkg-sym version desc)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
652 (save-excursion
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
653 (setq e (progn
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
654 (forward-line -1)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
655 (end-of-line)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
656 (point))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
657 (setq extent (make-extent b e))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
658 (if (car (cdr disp))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
659 (set-extent-face extent (get-face (car (cdr disp))))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
660 (set-extent-face extent (get-face 'default)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
661 (set-extent-property extent 'highlight t)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
662 (set-extent-property extent 'pui t)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
663 (set-extent-property extent 'pui-package pkg-sym)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
664 (set-extent-property extent 'pui-info info)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
665 (set-extent-property extent 'help-echo 'pui-help-echo)
1365
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
666 (set-extent-property extent 'keymap pui-package-keymap)))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
667 (sort (copy-sequence package-get-base)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
668 #'(lambda (a b)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
669 (string< (symbol-name (car a))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
670 (symbol-name (car b))))))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
671 (insert sep-string)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
672 (insert (documentation 'list-packages-mode))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
673 (set-buffer-modified-p nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
674 (setq buffer-read-only t)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
675 (pop-to-buffer outbuf)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
676 (delete-other-windows)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
677 (goto-char start)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
678 (setq pui-selected-packages nil) ; Reset list
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
679 (setq pui-deleted-packages nil) ; Reset list
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
680 (when (featurep 'menubar)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
681 (set-buffer-menubar current-menubar)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
682 (add-submenu '() pui-menu)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
683 (setq mode-popup-menu pui-menu))
1365
02909207294a [xemacs-hg @ 2003-03-20 13:19:56 by youngs]
youngs
parents: 852
diff changeset
684 (clear-message)))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
685
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
686 ;;;###autoload
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
687 (defalias 'list-packages 'pui-list-packages)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
688
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
689 (provide 'package-ui)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
690
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
691 ;;; package-ui.el ends here