diff options
| author | Lars Ingebrigtsen | 2022-04-08 14:46:14 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2022-04-08 14:46:14 +0200 |
| commit | e2f3b0f16eb34ac6f4941ddcf5b8ee24642656fc (patch) | |
| tree | 0eba1180932985c50c6db34c81162898dd5ca1fa | |
| parent | 5c532fe30305393079674557256dbb96253fd517 (diff) | |
| download | emacs-e2f3b0f16eb34ac6f4941ddcf5b8ee24642656fc.tar.gz emacs-e2f3b0f16eb34ac6f4941ddcf5b8ee24642656fc.zip | |
Improve package.el error messages on too-old Emacsen
* lisp/emacs-lisp/package.el (package-compute-transaction): Give a
better error message on too-old Emacs versions (bug#54747).
| -rw-r--r-- | lisp/emacs-lisp/package.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 6aa82e576d9..4f1ac5a5dac 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el | |||
| @@ -1854,8 +1854,12 @@ SEEN is used internally to detect infinite recursion." | |||
| 1854 | (error "Need package `%s-%s', but only %s is available" | 1854 | (error "Need package `%s-%s', but only %s is available" |
| 1855 | next-pkg (package-version-join next-version) | 1855 | next-pkg (package-version-join next-version) |
| 1856 | found-something)) | 1856 | found-something)) |
| 1857 | (t (error "Package `%s-%s' is unavailable" | 1857 | (t |
| 1858 | next-pkg (package-version-join next-version))))) | 1858 | (if (eq next-pkg 'emacs) |
| 1859 | (error "This package requires Emacs version %s" | ||
| 1860 | (package-version-join next-version)) | ||
| 1861 | (error "Package `%s-%s' is unavailable" | ||
| 1862 | next-pkg (package-version-join next-version)))))) | ||
| 1859 | (setq packages | 1863 | (setq packages |
| 1860 | (package-compute-transaction (cons found packages) | 1864 | (package-compute-transaction (cons found packages) |
| 1861 | (package-desc-reqs found) | 1865 | (package-desc-reqs found) |