mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-25 07:28:20 +00:00
Avoid duplicate load-path entry when generating package autoloads
'file-name-directory' produces a path ending in '/', so that needs to be run through 'directory-file-name' to avoid duplicate entries in 'load-path'. (Bug#63625) * lisp/emacs-lisp/package.el (package-generate-autoloads): Call 'directory-file-name' on the directory of 'load-file-name'.
This commit is contained in:
parent
117b29c6f6
commit
6f6071c526
@ -1110,8 +1110,12 @@ untar into a directory named DIR; otherwise, signal an error."
|
||||
;; Add the directory that will contain the autoload file to
|
||||
;; the load path. We don't hard-code `pkg-dir', to avoid
|
||||
;; issues if the package directory is moved around.
|
||||
(or (and load-file-name (file-name-directory load-file-name))
|
||||
(car load-path)))))
|
||||
;; `loaddefs-generate' has code to do this for us, but it's
|
||||
;; not currently exposed. (Bug#63625)
|
||||
(or (and load-file-name
|
||||
(directory-file-name
|
||||
(file-name-directory load-file-name)))
|
||||
(car load-path)))))
|
||||
(let ((buf (find-buffer-visiting output-file)))
|
||||
(when buf (kill-buffer buf)))
|
||||
auto-name))
|
||||
|
Loading…
Reference in New Issue
Block a user