mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
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 <liliana.prikler@gmail.com>
This commit is contained in:
committed by
Liliana Marie Prikler
parent
50621bc51a
commit
7c887aaeb9
@@ -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 ":"))))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user