diff options
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/emacs-lisp/package.el | 28 |
2 files changed, 20 insertions, 15 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 34e4e9d1c2b..def4620db02 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -3,6 +3,13 @@ | |||
| 3 | * hi-lock.el (hi-lock-unface-buffer): Don't call | 3 | * hi-lock.el (hi-lock-unface-buffer): Don't call |
| 4 | font-lock-remove-keywords if not needed (bug#19737). | 4 | font-lock-remove-keywords if not needed (bug#19737). |
| 5 | 5 | ||
| 6 | 2015-02-11 Artur Malabarba <bruce.connor.am@gmail.com> | ||
| 7 | |||
| 8 | * emacs-lisp/package.el (package-install): Invert the second | ||
| 9 | argument, for better backwards compatibility. | ||
| 10 | (package-install-button-action, package-reinstall) | ||
| 11 | (package-menu-execute): Account for the change. | ||
| 12 | |||
| 6 | 2015-02-11 Nicolas Petton <nicolas@petton.fr> | 13 | 2015-02-11 Nicolas Petton <nicolas@petton.fr> |
| 7 | 14 | ||
| 8 | * emacs-lisp/seq.el (seq-reverse): Add a backward-compatible | 15 | * emacs-lisp/seq.el (seq-reverse): Add a backward-compatible |
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index c3a2061aae2..60cf65d2305 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el | |||
| @@ -1221,15 +1221,15 @@ using `package-compute-transaction'." | |||
| 1221 | (mapc #'package-install-from-archive packages)) | 1221 | (mapc #'package-install-from-archive packages)) |
| 1222 | 1222 | ||
| 1223 | ;;;###autoload | 1223 | ;;;###autoload |
| 1224 | (defun package-install (pkg &optional mark-selected) | 1224 | (defun package-install (pkg &optional dont-select) |
| 1225 | "Install the package PKG. | 1225 | "Install the package PKG. |
| 1226 | PKG can be a package-desc or the package name of one the available packages | 1226 | PKG can be a package-desc or the package name of one the available packages |
| 1227 | in an archive in `package-archives'. Interactively, prompt for its name. | 1227 | in an archive in `package-archives'. Interactively, prompt for its name. |
| 1228 | 1228 | ||
| 1229 | If called interactively or if MARK-SELECTED is non-nil, add PKG | 1229 | If called interactively or if DONT-SELECT nil, add PKG to |
| 1230 | to `package-selected-packages'. | 1230 | `package-selected-packages'. |
| 1231 | 1231 | ||
| 1232 | if PKG is a package-desc and it is already installed, don't try | 1232 | If PKG is a package-desc and it is already installed, don't try |
| 1233 | to install it but still mark it as selected." | 1233 | to install it but still mark it as selected." |
| 1234 | (interactive | 1234 | (interactive |
| 1235 | (progn | 1235 | (progn |
| @@ -1247,11 +1247,11 @@ to install it but still mark it as selected." | |||
| 1247 | (symbol-name (car elt)))) | 1247 | (symbol-name (car elt)))) |
| 1248 | package-archive-contents)) | 1248 | package-archive-contents)) |
| 1249 | nil t)) | 1249 | nil t)) |
| 1250 | t))) | 1250 | nil))) |
| 1251 | (let ((name (if (package-desc-p pkg) | 1251 | (let ((name (if (package-desc-p pkg) |
| 1252 | (package-desc-name pkg) | 1252 | (package-desc-name pkg) |
| 1253 | pkg))) | 1253 | pkg))) |
| 1254 | (when (and mark-selected (not (package--user-selected-p name))) | 1254 | (unless (or dont-select (package--user-selected-p name)) |
| 1255 | (customize-save-variable 'package-selected-packages | 1255 | (customize-save-variable 'package-selected-packages |
| 1256 | (cons name package-selected-packages)))) | 1256 | (cons name package-selected-packages)))) |
| 1257 | (if (package-desc-p pkg) | 1257 | (if (package-desc-p pkg) |
| @@ -1276,7 +1276,7 @@ object." | |||
| 1276 | (package-delete | 1276 | (package-delete |
| 1277 | (if (package-desc-p pkg) pkg (cadr (assq pkg package-alist))) | 1277 | (if (package-desc-p pkg) pkg (cadr (assq pkg package-alist))) |
| 1278 | 'force 'nosave) | 1278 | 'force 'nosave) |
| 1279 | (package-install pkg)) | 1279 | (package-install pkg 'dont-select)) |
| 1280 | 1280 | ||
| 1281 | (defun package-strip-rcs-id (str) | 1281 | (defun package-strip-rcs-id (str) |
| 1282 | "Strip RCS version ID from the version string STR. | 1282 | "Strip RCS version ID from the version string STR. |
| @@ -1929,7 +1929,7 @@ If optional arg NO-ACTIVATE is non-nil, don't activate packages." | |||
| 1929 | (let ((pkg-desc (button-get button 'package-desc))) | 1929 | (let ((pkg-desc (button-get button 'package-desc))) |
| 1930 | (when (y-or-n-p (format "Install package `%s'? " | 1930 | (when (y-or-n-p (format "Install package `%s'? " |
| 1931 | (package-desc-full-name pkg-desc))) | 1931 | (package-desc-full-name pkg-desc))) |
| 1932 | (package-install pkg-desc 1) | 1932 | (package-install pkg-desc nil) |
| 1933 | (revert-buffer nil t) | 1933 | (revert-buffer nil t) |
| 1934 | (goto-char (point-min))))) | 1934 | (goto-char (point-min))))) |
| 1935 | 1935 | ||
| @@ -2427,13 +2427,11 @@ Optional argument NOQUERY non-nil means do not ask the user to confirm." | |||
| 2427 | (mapconcat #'package-desc-full-name | 2427 | (mapconcat #'package-desc-full-name |
| 2428 | install-list ", "))))) | 2428 | install-list ", "))))) |
| 2429 | (mapc (lambda (p) | 2429 | (mapc (lambda (p) |
| 2430 | ;; Mark as selected if it's the exact version of a | 2430 | ;; Don't mark as selected if it's a new version of |
| 2431 | ;; package that's already installed, or if it's not | 2431 | ;; an installed package. |
| 2432 | ;; installed at all. Don't mark if it's a new | 2432 | (package-install p (and (not (package-installed-p p)) |
| 2433 | ;; version of an installed package. | 2433 | (package-installed-p |
| 2434 | (package-install p (or (package-installed-p p) | 2434 | (package-desc-name p))))) |
| 2435 | (not (package-installed-p | ||
| 2436 | (package-desc-name p)))))) | ||
| 2437 | install-list))) | 2435 | install-list))) |
| 2438 | ;; Delete packages, prompting if necessary. | 2436 | ;; Delete packages, prompting if necessary. |
| 2439 | (when delete-list | 2437 | (when delete-list |