bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#63625: 29.0.90; package-install inserts package directory into load-


From: Robert Pluim
Subject: bug#63625: 29.0.90; package-install inserts package directory into load-path twice.
Date: Mon, 22 May 2023 14:46:37 +0200

>>>>> On Mon, 22 May 2023 14:25:02 +0300, Eli Zaretskii <eliz@gnu.org> said:

    >> Cc: todd smith <toddasmith@mac.com>
    >> From: Robert Pluim <rpluim@gmail.com>
    >> Date: Mon, 22 May 2023 10:55:13 +0200
    >> 
    >> This is because we didnʼt respect DRY. package.el should use the
    >> package support of `loaddefs-generate', but that doesnʼt expose the
    >> requisite feature of `loaddefs-generate--rubric' (maybe on master it 
does).
    >> 
    >> diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
    >> index 78017b77677..31e5e0809a8 100644
    >> --- a/lisp/emacs-lisp/package.el
    >> +++ b/lisp/emacs-lisp/package.el
    >> @@ -1107,8 +1107,9 @@ package-generate-autoloads
    >> ;; 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.
    >> +        (directory-file-name
    >> (or (and load-file-name (file-name-directory load-file-name))
    >> -            (car load-path)))))
    >> +            (car load-path))))))
    >> (let ((buf (find-buffer-visiting output-file)))
    >> (when buf (kill-buffer buf)))
    >> auto-name))

    Eli> Thanks.

    Eli> Philip, Stefan: any comments or suggestions?

Two other things:

1. Can `load-file-name' ever be nil here?
2. Should we just use $# instead of `load-file-nameʼ'?

(I also have a sneaking suspicion that this adding to `load-path' is
being done twice, but Iʼll look at that when this issue is fixed)

Robert
-- 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]