diff options
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/crm.el | 5 | ||||
-rw-r--r-- | lisp/emacs-lisp/edebug.el | 2 | ||||
-rw-r--r-- | lisp/emacs-lisp/package.el | 35 |
3 files changed, 34 insertions, 8 deletions
diff --git a/lisp/emacs-lisp/crm.el b/lisp/emacs-lisp/crm.el index e1e1847dd59..b8e327625e7 100644 --- a/lisp/emacs-lisp/crm.el +++ b/lisp/emacs-lisp/crm.el @@ -263,7 +263,8 @@ Completion is available on a per-element basis. For example, if the contents of the minibuffer are 'alice,bob,eve' and point is between 'l' and 'i', pressing TAB operates on the element 'alice'. -The return value of this function is a list of the read strings. +The return value of this function is a list of the read strings +with empty strings removed. See the documentation for `completing-read' for details on the arguments: PROMPT, TABLE, PREDICATE, REQUIRE-MATCH, INITIAL-INPUT, HIST, DEF, and @@ -287,7 +288,7 @@ INHERIT-INPUT-METHOD." prompt initial-input map nil hist def inherit-input-method))) (and def (string-equal input "") (setq input def)) - ;; Ignore empty strings in the list of return values. + ;; Remove empty strings in the list of read strings. (split-string input crm-separator t))) (remove-hook 'choose-completion-string-functions 'crm--choose-completion-string))) diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 4ecd244ebf2..5929ea7a856 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -3818,7 +3818,7 @@ Options: edebug--mode-saved-vars) (set (make-local-variable var) val)) ;; Append `edebug-kill-buffer' to the hook to avoid interfering with - ;; other entries that are ungarded against deleted buffer. + ;; other entries that are unguarded against deleted buffer. (add-hook 'kill-buffer-hook 'edebug-kill-buffer t t))) (defun edebug-kill-buffer () diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index c15c9e079fe..d005c200d0c 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -4,7 +4,7 @@ ;; Author: Tom Tromey <tromey@redhat.com> ;; Created: 10 Mar 2007 -;; Version: 1.0 +;; Version: 1.0.1 ;; Keywords: tools ;; This file is part of GNU Emacs. @@ -234,11 +234,28 @@ a package can run arbitrary code." :group 'package :version "24.1") +(defcustom package-pinned-packages nil + "An alist of packages that are pinned to a specific archive + +Each element has the form (SYM . ID). + SYM is a package, as a symbol. + ID is an archive name, as a string. This should correspond to an + entry in `package-archives'. + +If the archive of name ID does not contain the package SYM, no +other location will be considered, which will make the +package unavailable." + :type '(alist :key-type (symbol :tag "Package") + :value-type (string :tag "Archive name")) + :risky t + :group 'package + :version "24.4") + (defconst package-archive-version 1 "Version number of the package archive understood by this file. Lower version numbers than this will probably be understood as well.") -(defconst package-el-version "1.0" +(defconst package-el-version "1.0.1" "Version of package.el.") ;; We don't prime the cache since it tends to get out of date. @@ -794,7 +811,10 @@ but version %s required" (package-version-join (package-desc-vers (cdr pkg-desc))))) ;; Only add to the transaction if we don't already have it. (unless (memq next-pkg package-list) - (push next-pkg package-list)) + (setq package-list + ;; Move to front, so it gets installed early enough + ;; (bug#14082). + (cons next-pkg (delq next-pkg package-list)))) (setq package-list (package-compute-transaction package-list (package-desc-reqs @@ -857,8 +877,13 @@ Also, add the originating archive to the end of the package vector." (version (package-desc-vers (cdr package))) (entry (cons name (vconcat (cdr package) (vector archive)))) - (existing-package (assq name package-archive-contents))) - (cond ((not existing-package) + (existing-package (assq name package-archive-contents)) + (pinned-to-archive (assoc name package-pinned-packages))) + (cond ((and pinned-to-archive + ;; If pinned to another archive, skip entirely. + (not (equal (cdr pinned-to-archive) archive))) + nil) + ((not existing-package) (add-to-list 'package-archive-contents entry)) ((version-list-< (package-desc-vers (cdr existing-package)) version) |