refactor(tools/emacs-pkgs/tvl): drop lexical-let*

As I understand it, the file/buffer local lexical-binding variable
should be enough to have lexical let*:
https://www.gnu.org/software/emacs/manual/html_node/elisp/Using-Lexical-Binding.html

Change-Id: I744d9f47abce8bfa0a5d30fe69ba15fc4e697cac
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13131
Tested-by: BuildkiteCI
Reviewed-by: aspen <root@gws.fyi>
Autosubmit: sterni <sternenseemann@systemli.org>
This commit is contained in:
sterni 2025-02-11 17:50:09 +01:00 committed by clbot
parent 87e4ad0753
commit 7549b24863

View file

@ -1,11 +1,11 @@
;;; tvl.el --- description -*- lexical-binding: t; -*- ;;; tvl.el --- description -*- lexical-binding: t; -*-
;; ;;
;; Copyright (C) 2020 Griffin Smith ;; Copyright (C) 2020 Griffin Smith
;; Copyright (C) 2020 The TVL Contributors ;; Copyright (C) 2020-2023, 2025 The TVL Contributors
;; ;;
;; Author: Griffin Smith <grfn@gws.fyi> ;; Author: Griffin Smith <grfn@gws.fyi>
;; Version: 0.0.1 ;; Version: 0.0.1
;; Package-Requires: (cl s magit) ;; Package-Requires: (s magit)
;; ;;
;; This file is not part of GNU Emacs. ;; This file is not part of GNU Emacs.
;; ;;
@ -17,7 +17,6 @@
(require 'magit) (require 'magit)
(require 's) (require 's)
(require 'cl) ; TODO(tazjin): replace lexical-let* with non-deprecated alternative
(defgroup tvl nil (defgroup tvl nil
"Customisation options for TVL functionality.") "Customisation options for TVL functionality.")
@ -213,14 +212,14 @@ passes. This is potentially dangerous, use with care."
(interactive (list (read-string "Attribute: ") (interactive (list (read-string "Attribute: ")
(yes-or-no-p "Only include dependencies? "))) (yes-or-no-p "Only include dependencies? ")))
(lexical-let* ((outbuf (get-buffer-create (format "*depot-out/%s*" attribute))) (let* ((outbuf (get-buffer-create (format "*depot-out/%s*" attribute)))
(errbuf (get-buffer-create (format "*depot-errors/%s*" attribute))) (errbuf (get-buffer-create (format "*depot-errors/%s*" attribute)))
(attr-display (if only-deps attribute (format "dependencies of %s" attribute))) (attr-display (if only-deps attribute (format "dependencies of %s" attribute)))
(expression (if only-deps (expression (if only-deps
(format "let d = import <depot> {}; in d.nix.buildLisp.sbcl.lispWith d.%s.lispDeps" (format "let d = import <depot> {}; in d.nix.buildLisp.sbcl.lispWith d.%s.lispDeps"
attribute) attribute)
(format "(import <depot> {}).%s.repl" attribute))) (format "(import <depot> {}).%s.repl" attribute)))
(command (list "nix-build" "--no-out-link" "-I" (format "depot=%s" tvl-depot-path) "-E" expression))) (command (list "nix-build" "--no-out-link" "-I" (format "depot=%s" tvl-depot-path) "-E" expression)))
(message "Acquiring Lisp for <depot>.%s" attr-display) (message "Acquiring Lisp for <depot>.%s" attr-display)
(make-process :name (format "depot-nix-build/%s" attribute) (make-process :name (format "depot-nix-build/%s" attribute)
:buffer outbuf :buffer outbuf