From 7c887aaeb93ed1b9fee1ae8012ae37ff2ffc1a8e Mon Sep 17 00:00:00 2001 From: Sergey Trofimov Date: Mon, 12 Jan 2026 21:14:16 +0100 Subject: [PATCH] gnu: emacs: Fix flycheck errors in guix-emacs.el * gnu/packages/aux-files/emacs/guix-emacs.el: Fix flycheck warnings, replace when-let with when-let*. (guix-emacs--load-file-no-error): End docstring with a dot. (guix-emacs--non-core-load-path): Make a defsubst and add a docstring. Change-Id: I62d03b3fb9b4e671209ce5d8d7039d67f417d24b Signed-off-by: Liliana Marie Prikler --- gnu/packages/aux-files/emacs/guix-emacs.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gnu/packages/aux-files/emacs/guix-emacs.el b/gnu/packages/aux-files/emacs/guix-emacs.el index 8cffe039e0..f8611d9eee 100644 --- a/gnu/packages/aux-files/emacs/guix-emacs.el +++ b/gnu/packages/aux-files/emacs/guix-emacs.el @@ -56,11 +56,11 @@ The files in the list do not have extensions (.el, .elc)." nil))) (defun guix-emacs--load-file-no-error (file) - "Load FILE, ignoring any errors" + "Load FILE, ignoring any errors." (load file 'noerror (not guix-emacs-verbose))) -(defun guix-emacs--non-core-load-path () - ;; Filter out core Elisp directories, which are already handled by Emacs. +(defsubst guix-emacs--non-core-load-path () + "Filter out core Elisp directories, which are already handled by Emacs." (seq-filter (lambda (dir) (string-match-p "/share/emacs/site-lisp" dir)) load-path)) @@ -111,7 +111,7 @@ found in `load-path' to discover newly installed packages." ;; If emacs built with tree-sitter, read the value of the environment variable ;; to make tree-sitter grammars available in emacs out-of-the-box. (with-eval-after-load 'treesit - (when-let ((grammar-path (getenv "TREE_SITTER_GRAMMAR_PATH"))) + (when-let* ((grammar-path (getenv "TREE_SITTER_GRAMMAR_PATH"))) (mapcar (lambda (x) (add-to-list 'treesit-extra-load-path x)) (split-string grammar-path ":"))))