diff options
Diffstat (limited to 'lisp/emacs-lisp/package.el')
| -rw-r--r-- | lisp/emacs-lisp/package.el | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 19e412d5fd3..c928aeb0ed3 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el | |||
| @@ -673,22 +673,22 @@ untar into a directory named DIR; otherwise, signal an error." | |||
| 673 | "Policy to review incoming packages before installing them. | 673 | "Policy to review incoming packages before installing them. |
| 674 | Reviewing a package allows you to read the source code without | 674 | Reviewing a package allows you to read the source code without |
| 675 | installing anything, compare it to previous installations of the package | 675 | installing anything, compare it to previous installations of the package |
| 676 | and read the changelog. The default value of nil will install packages | 676 | and read the change log. The default value of nil will install packages |
| 677 | without any additional prompts, while t reviews all packages. By | 677 | without any additional prompts, while t reviews all packages. By |
| 678 | setting this user option to a list you can also selectively list what | 678 | setting this user option to a list you can also selectively list what |
| 679 | packages and archives to review. For the former, an entry of the | 679 | packages and archives to review. For the former, an entry of the |
| 680 | form (archive STRING) will review all packages form the archive | 680 | form (archive STRING) will review all packages from the archive |
| 681 | STRING (see `package-archives'), and an entry of the form (package | 681 | STRING (see `package-archives'), and an entry of the form (package |
| 682 | SYMBOL) will review package who's name matches SYMBOL. By prefixing the | 682 | SYMBOL) will review packages whose names match SYMBOL. If you prefix |
| 683 | list with a symbol `not' the rules are inverted." | 683 | the list with a symbol `not', the rules are inverted." |
| 684 | :type | 684 | :type |
| 685 | (let ((choice '(choice :tag "Review all packages form archive" | 685 | (let ((choice '(choice :tag "Review specific packages or archives" |
| 686 | (cons (const archive) (string :tag "Archive name")) | 686 | (cons (const archive) (string :tag "Archive name")) |
| 687 | (cons (const package) (symbol :tag "Package name"))))) | 687 | (cons (const package) (symbol :tag "Package name"))))) |
| 688 | `(choice | 688 | `(choice |
| 689 | (const :tag "Review all packages" t) | 689 | (const :tag "Review all packages" t) |
| 690 | (repeat :tag "Review these specific packages and archives" ,choice) | 690 | (repeat :tag "Review these specific packages and archives" ,choice) |
| 691 | (cons :tag "Review the complement of these packages and archives" | 691 | (cons :tag "Review packages and archives except these" |
| 692 | (const not) (repeat ,choice)))) | 692 | (const not) (repeat ,choice)))) |
| 693 | :risky t | 693 | :risky t |
| 694 | :version "31.1") | 694 | :version "31.1") |
| @@ -696,11 +696,12 @@ list with a symbol `not' the rules are inverted." | |||
| 696 | (defcustom package-review-directory temporary-file-directory | 696 | (defcustom package-review-directory temporary-file-directory |
| 697 | "Directory to unpack packages for review. | 697 | "Directory to unpack packages for review. |
| 698 | The value of this user option is used to rebind the variable | 698 | The value of this user option is used to rebind the variable |
| 699 | `temporary-file-directory'. The directory doesn't have to exist. If | 699 | `temporary-file-directory'. The directory doesn't have to exist; if |
| 700 | that is the case, Emacs creates the directory for you. You can | 700 | it doesn't, Emacs will create the directory for you. You can |
| 701 | therefore set the option to | 701 | therefore set the option to |
| 702 | 702 | ||
| 703 | (setopt package-review-directory (expand-file-name \"emacs\" (xdg-cache-home))) | 703 | (setopt package-review-directory |
| 704 | (expand-file-name \"emacs\" (xdg-cache-home))) | ||
| 704 | 705 | ||
| 705 | if you wish to have Emacs unpack the packages in your home directory, in | 706 | if you wish to have Emacs unpack the packages in your home directory, in |
| 706 | case you are concerned about moving files between file systems." | 707 | case you are concerned about moving files between file systems." |
| @@ -716,18 +717,18 @@ case you are concerned about moving files between file systems." | |||
| 716 | "-x" "'*-pkg.el'" ;ignore the package description | 717 | "-x" "'*-pkg.el'" ;ignore the package description |
| 717 | "-x" "'*.info'" ;ignore compiled Info files | 718 | "-x" "'*.info'" ;ignore compiled Info files |
| 718 | )) | 719 | )) |
| 719 | "Configuration how `package-review' should generate a Diff. | 720 | "Configuration of how `package-review' should generate a Diff. |
| 720 | The structure of the value must be (COMMAND . SWITCHES), where | 721 | The structure of the value must be (COMMAND . OPTIONS), where |
| 721 | `diff-command' is rebound to be COMMAND and SWITCHES are passed to | 722 | `diff-command' is rebound to be COMMAND and OPTIONS are command-line |
| 722 | `diff' as the SWITCHES argument if the user selects a diff-related | 723 | switches and arguments passed to `diff-no-select' as the SWITCHES argument |
| 723 | option during review." | 724 | if the user selects a diff-related option during review." |
| 724 | :type '(cons (string :tag "Diff command") | 725 | :type '(cons (string :tag "Diff command name") |
| 725 | (repeat :tag "Diff arguments" string)) | 726 | (repeat :tag "Diff command-line arguments" string)) |
| 726 | :version "31.1") | 727 | :version "31.1") |
| 727 | 728 | ||
| 728 | (defun package--review-p (pkg-desc) | 729 | (defun package--review-p (pkg-desc) |
| 729 | "Return non-nil if upgrading PKG-DESC requires a review. | 730 | "Return non-nil if upgrading PKG-DESC requires a review. |
| 730 | This package consults `package-review-policy' to determine if the user | 731 | This function consults `package-review-policy' to determine if the user |
| 731 | wants to review the package prior to installation. See `package-review'." | 732 | wants to review the package prior to installation. See `package-review'." |
| 732 | (let ((archive (package-desc-archive pkg-desc)) | 733 | (let ((archive (package-desc-archive pkg-desc)) |
| 733 | (name (package-desc-name pkg-desc))) | 734 | (name (package-desc-name pkg-desc))) |
| @@ -749,10 +750,10 @@ wants to review the package prior to installation. See `package-review'." | |||
| 749 | (declare-function diff-no-select "diff" (old new &optional switches no-async buf)) | 750 | (declare-function diff-no-select "diff" (old new &optional switches no-async buf)) |
| 750 | 751 | ||
| 751 | (defun package-review (pkg-desc pkg-dir old-desc) | 752 | (defun package-review (pkg-desc pkg-dir old-desc) |
| 752 | "Review the installation of PKG-DESC. | 753 | "Review the package specified PKG-DESC which is about to be installed. |
| 753 | PKG-DIR is the directory where the downloaded source of PKG-DIR have | 754 | PKG-DIR is the directory where the downloaded source of PKG-DESC have |
| 754 | been downloaded. OLD-DESC is either a `package-desc' object of the | 755 | been downloaded. OLD-DESC is either a `package-desc' object of the |
| 755 | previous installation or nil, if there is no prior installation. If the | 756 | previous installation or nil, if there was no prior installation. If the |
| 756 | review fails, the function throws a symbol `review-failed' with PKG-DESC | 757 | review fails, the function throws a symbol `review-failed' with PKG-DESC |
| 757 | attached." | 758 | attached." |
| 758 | (let ((news (let* ((pkg-dir (package-desc-dir pkg-desc)) | 759 | (let ((news (let* ((pkg-dir (package-desc-dir pkg-desc)) |