mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-04 19:29:37 +00:00
; Add "src" to the heuristic sub-directory heuristic
* lisp/emacs-lisp/package-vc.el (package-vc--unpack): Check for "src" directories, next to "lisp".
This commit is contained in:
parent
8ab6df0c9f
commit
637f5b164f
1 changed files with 15 additions and 12 deletions
|
@ -613,18 +613,21 @@ checkout. This overrides the `:branch' attribute in PKG-SPEC."
|
||||||
|
|
||||||
;; When nothing is specified about a `lisp-dir', then should
|
;; When nothing is specified about a `lisp-dir', then should
|
||||||
;; heuristically check if there is a sub-directory with lisp
|
;; heuristically check if there is a sub-directory with lisp
|
||||||
;; files. These are conventionally just called "lisp". If this
|
;; files. These are conventionally just called "lisp" or "src".
|
||||||
;; directory exists and contains non-zero number of lisp files, we
|
;; If this directory exists and contains non-zero number of lisp
|
||||||
;; will use that instead of `pkg-dir'.
|
;; files, we will use that instead of `pkg-dir'.
|
||||||
(when-let* (((null lisp-dir))
|
(catch 'done
|
||||||
(dir (expand-file-name "lisp" pkg-dir))
|
(dolist (name '("lisp" "src"))
|
||||||
((file-directory-p dir))
|
(when-let* (((null lisp-dir))
|
||||||
((directory-files dir nil "\\`[^.].+\\.el\\'" t 1)))
|
(dir (expand-file-name name pkg-dir))
|
||||||
;; We won't use `dir', since dir is an absolute path and we
|
((file-directory-p dir))
|
||||||
;; don't want `lisp-dir' to depend on the current location of
|
((directory-files dir nil "\\`[^.].+\\.el\\'" t 1)))
|
||||||
;; the package installation, ie. to break if moved around the
|
;; We won't use `dir', since dir is an absolute path and we
|
||||||
;; file system or between installations.
|
;; don't want `lisp-dir' to depend on the current location of
|
||||||
(setq lisp-dir "lisp"))
|
;; the package installation, ie. to break if moved around the
|
||||||
|
;; file system or between installations.
|
||||||
|
(throw 'done (setq lisp-dir name)))))
|
||||||
|
|
||||||
(when lisp-dir
|
(when lisp-dir
|
||||||
(push (cons :lisp-dir lisp-dir)
|
(push (cons :lisp-dir lisp-dir)
|
||||||
(package-desc-extras pkg-desc)))
|
(package-desc-extras pkg-desc)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue