diff options
| author | Philip Kaludercic | 2025-12-23 00:12:39 +0100 |
|---|---|---|
| committer | Philip Kaludercic | 2026-01-01 13:47:41 +0100 |
| commit | 4771cd2e5835efb6cfbc2efe2287ff58e7b5b6dc (patch) | |
| tree | ca8988531c3f7e74a094193744e6fa282a2d9283 /lisp | |
| parent | e1f87081d417ce69f6e101d9d38feeb77e4f3697 (diff) | |
| download | emacs-4771cd2e5835efb6cfbc2efe2287ff58e7b5b6dc.tar.gz emacs-4771cd2e5835efb6cfbc2efe2287ff58e7b5b6dc.zip | |
; Fix test resulting from 5744519e
* lisp/emacs-lisp/package.el (package-install): Delete dead code
resulting from previous change.
* test/lisp/emacs-lisp/package-tests.el
(package-test-install-single): Adjust code to expect
'user-error'
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/emacs-lisp/package.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 5118f25f468..70e88d081fa 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el | |||
| @@ -2280,15 +2280,15 @@ had been enabled." | |||
| 2280 | nil t)) | 2280 | nil t)) |
| 2281 | nil))) | 2281 | nil))) |
| 2282 | (cl-check-type pkg (or symbol package-desc)) | 2282 | (cl-check-type pkg (or symbol package-desc)) |
| 2283 | (when (or (and package-install-upgrade-built-in | ||
| 2284 | (package--active-built-in-p pkg)) | ||
| 2285 | (package-installed-p pkg)) | ||
| 2286 | (user-error "Package is already installed")) | ||
| 2287 | (package--archives-initialize) | 2283 | (package--archives-initialize) |
| 2288 | (add-hook 'post-command-hook #'package-menu--post-refresh) | 2284 | (add-hook 'post-command-hook #'package-menu--post-refresh) |
| 2289 | (let ((name (if (package-desc-p pkg) | 2285 | (let ((name (if (package-desc-p pkg) |
| 2290 | (package-desc-name pkg) | 2286 | (package-desc-name pkg) |
| 2291 | pkg))) | 2287 | pkg))) |
| 2288 | (when (or (and package-install-upgrade-built-in | ||
| 2289 | (package--active-built-in-p pkg)) | ||
| 2290 | (package-installed-p pkg)) | ||
| 2291 | (user-error "`%s' is already installed" name)) | ||
| 2292 | (unless (or dont-select (package--user-selected-p name)) | 2292 | (unless (or dont-select (package--user-selected-p name)) |
| 2293 | (package--save-selected-packages | 2293 | (package--save-selected-packages |
| 2294 | (cons name package-selected-packages))) | 2294 | (cons name package-selected-packages))) |
| @@ -2304,8 +2304,8 @@ had been enabled." | |||
| 2304 | (progn | 2304 | (progn |
| 2305 | (package-download-transaction transaction) | 2305 | (package-download-transaction transaction) |
| 2306 | (package--quickstart-maybe-refresh) | 2306 | (package--quickstart-maybe-refresh) |
| 2307 | (message "Package `%s' installed." name)) | 2307 | (message "Package `%s' installed." name))))) |
| 2308 | (message "`%s' is already installed" name)))) | 2308 | |
| 2309 | 2309 | ||
| 2310 | (declare-function package-vc-upgrade "package-vc" (pkg)) | 2310 | (declare-function package-vc-upgrade "package-vc" (pkg)) |
| 2311 | 2311 | ||