summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorStefan Kangas <stefankangas@gmail.com>2023-01-12 06:30:12 +0100
committerStefan Kangas <stefankangas@gmail.com>2023-01-12 06:30:12 +0100
commite2abb95b6b03d13e60609ee85ea00bbf44a0bd6b (patch)
tree64cbc652e2ab5104fa03205cb584dadf0e10d2ef /lisp/emacs-lisp
parentc51bfef34a6bdefad048444c279ea5b63a6aada1 (diff)
parentf4f30ff4c44dcfdf780f1981aa541af713f2805f (diff)
downloademacs-e2abb95b6b03d13e60609ee85ea00bbf44a0bd6b.tar.gz
emacs-e2abb95b6b03d13e60609ee85ea00bbf44a0bd6b.tar.bz2
emacs-e2abb95b6b03d13e60609ee85ea00bbf44a0bd6b.zip
Merge from origin/emacs-29
f4f30ff4c44 Update to Org 9.6.1 09f7a920644 Add support for annotation_type_declaration 4a8891a462e * etc/NEWS: Mention incompatible changes in 'outline-mino... 384504edf35 Ensure VC package names are not empty 70947da708c Handle missing package description when unpacking vc pack... # Conflicts: # etc/NEWS
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/package-vc.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
index ddcfe57928b..b5b8a6746a6 100644
--- a/lisp/emacs-lisp/package-vc.el
+++ b/lisp/emacs-lisp/package-vc.el
@@ -600,10 +600,14 @@ PKG-SPEC is a package specification, a property list describing
how to fetch and build the package. See `package-vc--archive-spec-alist'
for details. The optional argument REV specifies a specific revision to
checkout. This overrides the `:branch' attribute in PKG-SPEC."
+ (unless pkg-desc
+ (package-desc-create :name (car pkg-spec) :kind 'vc))
(pcase-let* (((map :lisp-dir) pkg-spec)
(name (package-desc-name pkg-desc))
(dirname (package-desc-full-name pkg-desc))
(pkg-dir (expand-file-name dirname package-user-dir)))
+ (when (string-empty-p name)
+ (user-error "Empty package name"))
(setf (package-desc-dir pkg-desc) pkg-dir)
(when (file-exists-p pkg-dir)
(if (yes-or-no-p (format "Overwrite previous checkout for package `%s'?" name))
@@ -771,7 +775,9 @@ regular package, but it will not remove a VC package.
(package-vc--archives-initialize)
(let* ((name-or-url (package-vc--read-package-name
"Fetch and install package: " t))
- (name (file-name-base name-or-url)))
+ (name (file-name-base (directory-file-name name-or-url))))
+ (when (string-empty-p name)
+ (user-error "Empty package name"))
(list name-or-url
(and current-prefix-arg :last-release)
nil