branch: elpa/nix-mode commit e8f9e83199077b9e457decc40208b09ff0774583 Author: Daniel Nagy <danieln...@posteo.de> Commit: Daniel Nagy <danieln...@posteo.de>
Simplify #'nix-show-config with `let-alist` --- nix.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nix.el b/nix.el index acdf23aeb1..c95283402e 100644 --- a/nix.el +++ b/nix.el @@ -18,6 +18,8 @@ (require 'pcomplete) (require 'json) +(eval-when-compile + (require 'let-alist)) (defgroup nix nil "Nix-related customizations" @@ -196,7 +198,8 @@ OPTIONS a list of options to accept." "Whether Nix is a version with Flakes support." ;; earlier versions reported as 3, now it’s just nix-2.4 (and (nix-is-24) - (seq-contains-p (alist-get 'value (alist-get 'experimental-features (nix-show-config))) "flakes"))) + (let-alist (nix-show-config) + (seq-contains-p .experimental-features.value "flakes")))) ;;;###autoload (defun pcomplete/nix ()