Mercurial > hg > xemacs-beta
comparison lisp/package-ui.el @ 1410:44de306310b8
[xemacs-hg @ 2003-04-14 03:40:26 by youngs]
2003-04-14 Steve Youngs <youngs@xemacs.org>
* package-admin.el (package-admin-find-top-directory): Use
'directory-sep-char'.
(package-admin-get-install-dir): Ditto.
This is so PUI won't break on platforms that don't use '/' as the
directory separator.
* package-get.el (package-get-pgp-available-p): New.
(package-get-require-signed-base-updates): Use it.
(package-get-update-base-from-buffer): Move the code that finds
the gpg stuff into `package-get-pgp-available-p'.
Now if you have Mailcrypt and a PGP binary installed and set up on
your system, PUI will automatically default to doing PGP
verification, otherwise it'll default to off.
(package-get-require-base): Use the DATUM arg to `error'.
(package-get-locate-index-file): Ditto.
(package-get-update-base): Ditto.
(package-get-update-base-entries): Ditto.
(package-get-all): Ditto.
(package-get-dependencies): Ditto.
(package-get-info): Ditto.
(package-get): Ditto.
* package-info.el (batch-update-package-info): Use the DATUM arg
to `error'.
* package-net.el (package-net-batch-generate-bin-ini): Use the
DATUM arg to `error'.
* package-ui.el (pui-toggle-package-key): Use the DATUM arg to
`error'.
(pui-toggle-package-delete-key): Ditto.
(pui-install-selected-packages): Ditto.
(pui-add-required-packages): Ditto.
(pui-display-info): Ditto.
(list-packages-mode): Ditto.
* packages.el (package-require): Use the DATUM arg to `error'.
author | youngs |
---|---|
date | Mon, 14 Apr 2003 03:40:27 +0000 |
parents | 69a674f5861f |
children | d90ba01b5346 |
comparison
equal
deleted
inserted
replaced
1409:d9b958c0f772 | 1410:44de306310b8 |
---|---|
280 (let (extent) | 280 (let (extent) |
281 (if (setq extent (extent-at (point) (current-buffer) 'pui)) | 281 (if (setq extent (extent-at (point) (current-buffer) 'pui)) |
282 (progn | 282 (progn |
283 (pui-toggle-package extent) | 283 (pui-toggle-package extent) |
284 (forward-line 1)) | 284 (forward-line 1)) |
285 (error "No package under cursor!")))) | 285 (error 'invalid-operation |
286 "No package under cursor!")))) | |
286 | 287 |
287 (defun pui-toggle-package-delete (extent) | 288 (defun pui-toggle-package-delete (extent) |
288 (let (pkg-sym) | 289 (let (pkg-sym) |
289 (setq pkg-sym (extent-property extent 'pui-package)) | 290 (setq pkg-sym (extent-property extent 'pui-package)) |
290 (if (member pkg-sym pui-deleted-packages) | 291 (if (member pkg-sym pui-deleted-packages) |
303 (let (extent) | 304 (let (extent) |
304 (if (setq extent (extent-at (point) (current-buffer) 'pui)) | 305 (if (setq extent (extent-at (point) (current-buffer) 'pui)) |
305 (progn | 306 (progn |
306 (pui-toggle-package-delete extent) | 307 (pui-toggle-package-delete extent) |
307 (forward-line 1)) | 308 (forward-line 1)) |
308 (error "No package under cursor!")))) | 309 (error 'invalid-operation |
310 "No package under cursor!")))) | |
309 | 311 |
310 (defun pui-current-package () | 312 (defun pui-current-package () |
311 (let ((extent (extent-at (point) (current-buffer) 'pui))) | 313 (let ((extent (extent-at (point) (current-buffer) 'pui))) |
312 (if extent | 314 (if extent |
313 (extent-property extent 'pui-package)))) | 315 (extent-property extent 'pui-package)))) |
392 (pui-list-packages) | 394 (pui-list-packages) |
393 (message "Packages installed")))) | 395 (message "Packages installed")))) |
394 (clear-message))) | 396 (clear-message))) |
395 (if pui-deleted-packages | 397 (if pui-deleted-packages |
396 (pui-list-packages) | 398 (pui-list-packages) |
397 (error "No packages have been selected!"))) | 399 (error 'invalid-operation |
400 "No packages have been selected!"))) | |
398 ;; sync with windows type systems | 401 ;; sync with windows type systems |
399 (package-net-update-installed-db))) | 402 (package-net-update-installed-db))) |
400 | 403 |
401 (defun pui-add-required-packages () | 404 (defun pui-add-required-packages () |
402 "Select packages required by those already selected for installation." | 405 "Select packages required by those already selected for installation." |
450 (map-extents #'(lambda (extent maparg) | 453 (map-extents #'(lambda (extent maparg) |
451 (pui-update-package-display extent)) | 454 (pui-update-package-display extent)) |
452 nil nil nil nil nil 'pui) | 455 nil nil nil nil nil 'pui) |
453 (message "added dependencies")) | 456 (message "added dependencies")) |
454 (clear-message))) | 457 (clear-message))) |
455 (error "No packages have been selected!")))) | 458 (error 'invalid-operation |
459 "No packages have been selected!")))) | |
456 | 460 |
457 (defun pui-help-echo (extent &optional force-update) | 461 (defun pui-help-echo (extent &optional force-update) |
458 "Display additional package info in the modeline. | 462 "Display additional package info in the modeline. |
459 EXTENT determines the package to display (the package information is | 463 EXTENT determines the package to display (the package information is |
460 attached to the extent as properties)." | 464 attached to the extent as properties)." |
500 (beginning-of-line) | 504 (beginning-of-line) |
501 (if (setq extent (extent-at (point) (current-buffer) 'pui)) | 505 (if (setq extent (extent-at (point) (current-buffer) 'pui)) |
502 (message (pui-help-echo extent t)) | 506 (message (pui-help-echo extent t)) |
503 (if no-error | 507 (if no-error |
504 (clear-message nil) | 508 (clear-message nil) |
505 (error "No package under cursor!")))))) | 509 (error 'invalid-operation |
510 "No package under cursor!")))))) | |
506 | 511 |
507 (defvar pui-menu | 512 (defvar pui-menu |
508 '("Packages" | 513 '("Packages" |
509 ["Toggle install " pui-toggle-package-key :active (pui-current-package) :suffix (format "`%s'" (or (pui-current-package) "..."))] | 514 ["Toggle install " pui-toggle-package-key :active (pui-current-package) :suffix (format "`%s'" (or (pui-current-package) "..."))] |
510 ["Toggle delete " pui-toggle-package-delete-key :active (pui-current-package) :suffix (format "`%s'" (or (pui-current-package) "..."))] | 515 ["Toggle delete " pui-toggle-package-delete-key :active (pui-current-package) :suffix (format "`%s'" (or (pui-current-package) "..."))] |
548 `\\[pui-display-info]' to display additional information about the package in the modeline. | 553 `\\[pui-display-info]' to display additional information about the package in the modeline. |
549 `\\[pui-list-packages]' to refresh the package list. | 554 `\\[pui-list-packages]' to refresh the package list. |
550 `\\[pui-toggle-verbosity-redisplay]' to toggle between a verbose and non-verbose display. | 555 `\\[pui-toggle-verbosity-redisplay]' to toggle between a verbose and non-verbose display. |
551 `\\[pui-quit]' to kill this buffer. | 556 `\\[pui-quit]' to kill this buffer. |
552 " | 557 " |
553 (error "You cannot enter this mode directly. Use `pui-list-packages'")) | 558 (error 'invalid-operation |
559 "You cannot enter this mode directly. Use `pui-list-packages'")) | |
554 | 560 |
555 (put 'list-packages-mode 'mode-class 'special) | 561 (put 'list-packages-mode 'mode-class 'special) |
556 | 562 |
557 ;;;###autoload | 563 ;;;###autoload |
558 (defun pui-list-packages () | 564 (defun pui-list-packages () |