mirror of
https://github.com/vale981/melpazoid
synced 2025-03-06 01:41:38 -05:00
fix: address Emacs 27's lexical binding by default
This commit is contained in:
parent
7cea66c743
commit
f7436f6624
1 changed files with 11 additions and 7 deletions
|
@ -144,15 +144,19 @@ def check_containerized_build(recipe: str, elisp_dir: str):
|
||||||
|
|
||||||
|
|
||||||
def _files_in_recipe(recipe: str, elisp_dir: str) -> List[str]:
|
def _files_in_recipe(recipe: str, elisp_dir: str) -> List[str]:
|
||||||
"""Return a file listing, relative to elisp_dir."""
|
"""Return a file listing, relative to elisp_dir.
|
||||||
|
>>> _files_in_recipe('(melpazoid :fetcher github :repo "xyz")', 'melpazoid')
|
||||||
|
['melpazoid/melpazoid.el']
|
||||||
|
"""
|
||||||
files = run_build_script(
|
files = run_build_script(
|
||||||
f"""
|
f"""
|
||||||
(require 'package-build)
|
(require 'package-build)
|
||||||
|
(setq package-build-working-dir "{os.path.dirname(elisp_dir)}")
|
||||||
|
(setq rcp {_recipe_struct_elisp(recipe)})
|
||||||
(send-string-to-terminal
|
(send-string-to-terminal
|
||||||
(let* ((package-build-working-dir "{os.path.dirname(elisp_dir)}")
|
(mapconcat
|
||||||
(rcp {_recipe_struct_elisp(recipe)}))
|
(lambda (x) (format "%s" x))
|
||||||
(mapconcat (lambda (x) (format "%s" x))
|
(package-build--expand-source-file-list rcp) "\n"))
|
||||||
(package-build--expand-source-file-list rcp) "\n")))
|
|
||||||
"""
|
"""
|
||||||
).split('\n')
|
).split('\n')
|
||||||
files = [os.path.join(elisp_dir, file) for file in files]
|
files = [os.path.join(elisp_dir, file) for file in files]
|
||||||
|
@ -826,8 +830,8 @@ def _recipe_struct_elisp(recipe: str) -> str:
|
||||||
return run_build_script(
|
return run_build_script(
|
||||||
f"""
|
f"""
|
||||||
(require 'package-recipe)
|
(require 'package-recipe)
|
||||||
(let ((package-build-recipes-dir "{tmpdir}"))
|
(setq package-build-recipes-dir "{tmpdir}")
|
||||||
(send-string-to-terminal (format "%S" (package-recipe-lookup "{name}"))))
|
(send-string-to-terminal (format "%S" (package-recipe-lookup "{name}")))
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue