* hi-lock.el (hi-lock-unface-buffer): Don't call
font-lock-remove-keywords if not needed (bug#19737).
+2015-02-11 Artur Malabarba <bruce.connor.am@gmail.com>
+
+ * emacs-lisp/package.el (package-install): Invert the second
+ argument, for better backwards compatibility.
+ (package-install-button-action, package-reinstall)
+ (package-menu-execute): Account for the change.
+
2015-02-11 Nicolas Petton <nicolas@petton.fr>
* emacs-lisp/seq.el (seq-reverse): Add a backward-compatible
(mapc #'package-install-from-archive packages))
;;;###autoload
-(defun package-install (pkg &optional mark-selected)
+(defun package-install (pkg &optional dont-select)
"Install the package PKG.
PKG can be a package-desc or the package name of one the available packages
in an archive in `package-archives'. Interactively, prompt for its name.
-If called interactively or if MARK-SELECTED is non-nil, add PKG
-to `package-selected-packages'.
+If called interactively or if DONT-SELECT nil, add PKG to
+`package-selected-packages'.
-if PKG is a package-desc and it is already installed, don't try
+If PKG is a package-desc and it is already installed, don't try
to install it but still mark it as selected."
(interactive
(progn
(symbol-name (car elt))))
package-archive-contents))
nil t))
- t)))
+ nil)))
(let ((name (if (package-desc-p pkg)
(package-desc-name pkg)
pkg)))
- (when (and mark-selected (not (package--user-selected-p name)))
+ (unless (or dont-select (package--user-selected-p name))
(customize-save-variable 'package-selected-packages
(cons name package-selected-packages))))
(if (package-desc-p pkg)
(package-delete
(if (package-desc-p pkg) pkg (cadr (assq pkg package-alist)))
'force 'nosave)
- (package-install pkg))
+ (package-install pkg 'dont-select))
(defun package-strip-rcs-id (str)
"Strip RCS version ID from the version string STR.
(let ((pkg-desc (button-get button 'package-desc)))
(when (y-or-n-p (format "Install package `%s'? "
(package-desc-full-name pkg-desc)))
- (package-install pkg-desc 1)
+ (package-install pkg-desc nil)
(revert-buffer nil t)
(goto-char (point-min)))))
(mapconcat #'package-desc-full-name
install-list ", ")))))
(mapc (lambda (p)
- ;; Mark as selected if it's the exact version of a
- ;; package that's already installed, or if it's not
- ;; installed at all. Don't mark if it's a new
- ;; version of an installed package.
- (package-install p (or (package-installed-p p)
- (not (package-installed-p
- (package-desc-name p))))))
+ ;; Don't mark as selected if it's a new version of
+ ;; an installed package.
+ (package-install p (and (not (package-installed-p p))
+ (package-installed-p
+ (package-desc-name p)))))
install-list)))
;; Delete packages, prompting if necessary.
(when delete-list