[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: feature/package-vc has been merged
From: |
Stefan Monnier |
Subject: |
Re: feature/package-vc has been merged |
Date: |
Wed, 09 Nov 2022 12:49:20 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
> diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
> index 0881626e92..67ce30a93c 100644
> --- a/lisp/emacs-lisp/package.el
> +++ b/lisp/emacs-lisp/package.el
> @@ -1103,8 +1103,17 @@ package-generate-autoloads
> (package-lisp-dir pkg-desc)
> output-file nil
> (prin1-to-string
> - `(add-to-list 'load-path
> - ,(package-lisp-dir pkg-desc))))
> + `(add-to-list
> + 'load-path
> + (file-name-concat
> + ;; 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))
> + ;; In case the package specification indicates that the lisp
> + ;; files are found in a subdirectory, append that path.
> + ,(alist-get :lisp-dir (package-desc-extras pkg-desc))))))
> (let ((buf (find-buffer-visiting output-file)))
> (when buf (kill-buffer buf)))
> auto-name))
I don't understand why we have code relating to `package-vc` in
`package.el`.
Please be careful to try to correctly preserve the *exact* name added to
`load-path` (most importantly whether it ends in a slash or not),
because some other code relies on it (e.g. to try and avoid having both
`/foo/bar` and `/foo/bar/` or to remove entries).
Stefan
- Re: feature/package-vc has been merged, (continued)
- Re: feature/package-vc has been merged, Philip Kaludercic, 2022/11/07
- Re: feature/package-vc has been merged, Eli Zaretskii, 2022/11/07
- Re: feature/package-vc has been merged, Stefan Monnier, 2022/11/07
- Re: feature/package-vc has been merged, Philip Kaludercic, 2022/11/07
- Re: feature/package-vc has been merged, Eli Zaretskii, 2022/11/07
- Re: feature/package-vc has been merged, Philip Kaludercic, 2022/11/08
- Re: feature/package-vc has been merged, Stefan Monnier, 2022/11/08
- Re: feature/package-vc has been merged, Philip Kaludercic, 2022/11/09
- Re: feature/package-vc has been merged, Eli Zaretskii, 2022/11/09
- Re: feature/package-vc has been merged, Philip Kaludercic, 2022/11/09
- Re: feature/package-vc has been merged,
Stefan Monnier <=
- Re: feature/package-vc has been merged, Philip Kaludercic, 2022/11/09
- Re: feature/package-vc has been merged, Stefan Monnier, 2022/11/09
- Re: feature/package-vc has been merged, Philip Kaludercic, 2022/11/09
- Re: feature/package-vc has been merged, Stefan Monnier, 2022/11/09
- Re: feature/package-vc has been merged, Philip Kaludercic, 2022/11/09
- Re: feature/package-vc has been merged, Stefan Monnier, 2022/11/09
- Re: feature/package-vc has been merged, Philip Kaludercic, 2022/11/09
- Re: feature/package-vc has been merged, Stefan Monnier, 2022/11/16
- Re: feature/package-vc has been merged, Philip Kaludercic, 2022/11/16
- Re: feature/package-vc has been merged, Stefan Monnier, 2022/11/16