diff options
author | Lin Jian <me@linj.tech> | 2025-03-21 09:35:07 +0800 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2025-03-31 14:56:26 -0400 |
commit | bdee2481728f57053690f0dd76c943ddd5f343d9 (patch) | |
tree | bb4978e7f3ed732526386d71d66ff58b3a06224d | |
parent | 6f311883d246df87fa3ed9c24dbb39078e3fd69f (diff) | |
download | emacs-master.tar.gz emacs-master.tar.bz2 emacs-master.zip |
Fix pkg description file name when pkg name has numbers (Bug#77143)master
* lisp/subr.el (package--description-file): Match end of string and add
`snapshot` among the possible version names.
Copyright-paperwork-exempt: yes
-rw-r--r-- | lisp/subr.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index 684d511f2f8..86f5d7698ce 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -7270,7 +7270,9 @@ as a list.") "Return package description file name for package DIR." (concat (let ((subdir (file-name-nondirectory (directory-file-name dir)))) - (if (string-match "\\([^.].*?\\)-\\([0-9]+\\(?:[.][0-9]+\\|\\(?:pre\\|beta\\|alpha\\)[0-9]+\\)*\\)" subdir) + ;; This needs to match only the version strings that can be + ;; generated by `package-version-join'. + (if (string-match "\\([^.].*?\\)-\\([0-9]+\\(?:[.][0-9]+\\|\\(?:pre\\|beta\\|alpha\\|snapshot\\)[0-9]+\\)*\\)\\'" subdir) (match-string 1 subdir) subdir)) "-pkg.el")) |