aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/emacs-lisp/package.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp/package.el')
-rw-r--r--lisp/emacs-lisp/package.el41
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.
674Reviewing a package allows you to read the source code without 674Reviewing a package allows you to read the source code without
675installing anything, compare it to previous installations of the package 675installing anything, compare it to previous installations of the package
676and read the changelog. The default value of nil will install packages 676and read the change log. The default value of nil will install packages
677without any additional prompts, while t reviews all packages. By 677without any additional prompts, while t reviews all packages. By
678setting this user option to a list you can also selectively list what 678setting this user option to a list you can also selectively list what
679packages and archives to review. For the former, an entry of the 679packages and archives to review. For the former, an entry of the
680form (archive STRING) will review all packages form the archive 680form (archive STRING) will review all packages from the archive
681STRING (see `package-archives'), and an entry of the form (package 681STRING (see `package-archives'), and an entry of the form (package
682SYMBOL) will review package who's name matches SYMBOL. By prefixing the 682SYMBOL) will review packages whose names match SYMBOL. If you prefix
683list with a symbol `not' the rules are inverted." 683the 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.
698The value of this user option is used to rebind the variable 698The 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
700that is the case, Emacs creates the directory for you. You can 700it doesn't, Emacs will create the directory for you. You can
701therefore set the option to 701therefore 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
705if you wish to have Emacs unpack the packages in your home directory, in 706if you wish to have Emacs unpack the packages in your home directory, in
706case you are concerned about moving files between file systems." 707case 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.
720The structure of the value must be (COMMAND . SWITCHES), where 721The 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 723switches and arguments passed to `diff-no-select' as the SWITCHES argument
723option during review." 724if 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.
730This package consults `package-review-policy' to determine if the user 731This function consults `package-review-policy' to determine if the user
731wants to review the package prior to installation. See `package-review'." 732wants 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.
753PKG-DIR is the directory where the downloaded source of PKG-DIR have 754PKG-DIR is the directory where the downloaded source of PKG-DESC have
754been downloaded. OLD-DESC is either a `package-desc' object of the 755been downloaded. OLD-DESC is either a `package-desc' object of the
755previous installation or nil, if there is no prior installation. If the 756previous installation or nil, if there was no prior installation. If the
756review fails, the function throws a symbol `review-failed' with PKG-DESC 757review fails, the function throws a symbol `review-failed' with PKG-DESC
757attached." 758attached."
758 (let ((news (let* ((pkg-dir (package-desc-dir pkg-desc)) 759 (let ((news (let* ((pkg-dir (package-desc-dir pkg-desc))