summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2022-12-25 15:31:33 -0500
committerEli Zaretskii <eliz@gnu.org>2022-12-26 14:55:08 +0200
commit6c86faec29e7e9f12b71886dc66b62e1da43cdf7 (patch)
treee95e92635bf691a896ad6165895eb3990a311cfd
parentd90d7d15f2f78c37b9a5c775e617ab6f5cd5fb01 (diff)
downloademacs-6c86faec29e7e9f12b71886dc66b62e1da43cdf7.tar.gz
emacs-6c86faec29e7e9f12b71886dc66b62e1da43cdf7.tar.bz2
emacs-6c86faec29e7e9f12b71886dc66b62e1da43cdf7.zip
loaddefs-gen: Group results by absolute file name
loaddefs-generate produced an incomplete output file if 1) it was called with a relative file name and 2) that same file was specified via a generated-autoload-file cookie in a subset of the input files. In that case, autoload entries were lost because loaddefs-generate writes the same output file twice: once for the relative name specified by the caller and once for the absolute name that loaddefs-generate--parse-file returns for the generated-autoload-file value. This has been fixed. (Bug#60318) * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Expand file names when grouping loaddef files.
-rw-r--r--lisp/emacs-lisp/loaddefs-gen.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el
index 2dd04174f54..460d8eca586 100644
--- a/lisp/emacs-lisp/loaddefs-gen.el
+++ b/lisp/emacs-lisp/loaddefs-gen.el
@@ -608,7 +608,8 @@ instead of just updating them with the new/changed autoloads."
(write-region (point-min) (point-max) output-file nil 'silent))
;; We have some data, so generate the loaddef files. First
;; group per output file.
- (dolist (fdefs (seq-group-by #'car defs))
+ (dolist (fdefs (seq-group-by (lambda (x) (expand-file-name (car x)))
+ defs))
(let ((loaddefs-file (car fdefs))
hash)
(with-temp-buffer