From c895a170f0170ffe16cdeb4e02a31e1f65cd0115 Mon Sep 17 00:00:00 2001 From: Akira Komamura Date: Sun, 21 Jul 2024 22:23:43 +0900 Subject: [PATCH] fix: Silence byte-compiler --- nix3-core.el | 9 +++++++-- nix3-flake-lock.el | 6 ++++-- nix3-help.el | 6 +++--- nix3-transient.el | 1 + nix3-utils.el | 2 ++ 5 files changed, 17 insertions(+), 7 deletions(-) diff --git a/nix3-core.el b/nix3-core.el index eac1e1a..4c1182d 100644 --- a/nix3-core.el +++ b/nix3-core.el @@ -29,15 +29,20 @@ ;;; Code: +(eval-when-compile + (require 'rx)) +(require 'subr-x) (require 'map) -(declare-function string-remove-suffix "subr-x") - (defgroup nix3 nil "Interface to experimental commands of Nix." :prefix "nix3-" :group 'nix) +(defgroup nix3-face nil + "Faces for nix3." + :group 'nix3) + ;;;; Custom variables (defcustom nix3-nix-executable "nix" diff --git a/nix3-flake-lock.el b/nix3-flake-lock.el index 0b71cc6..235225a 100644 --- a/nix3-flake-lock.el +++ b/nix3-flake-lock.el @@ -50,11 +50,13 @@ (defface nix3-flake-lock-file-heading '((t (:inherit magit-diff-file-heading))) - "Face for flake.lock file paths.") + "Face for flake.lock file paths." + :group 'nix3-face) (defface nix3-flake-lock-node-heading '((t (:inherit magit-section-heading))) - "Face for flake.lock nodes.") + "Face for flake.lock nodes." + :group 'nix3-face) ;;;; diff --git a/nix3-help.el b/nix3-help.el index ee0b383..a500dea 100644 --- a/nix3-help.el +++ b/nix3-help.el @@ -61,14 +61,14 @@ (error "Failed to parse nix --help")) (goto-char (point-min)) (re-search-forward start-heading) - (delete-region (point-min) (pos-eol)) + (delete-region (point-min) (line-end-position)) (when end-heading (re-search-forward end-heading) - (delete-region (pos-bol) (point-max))) + (delete-region (line-beginning-position) (point-max))) (goto-char (point-min)) ;; Parse outputs (while (re-search-forward regexp nil t) - (delete-region (pos-bol) (pos-eol))) + (delete-region (line-beginning-position) (line-end-position))) (goto-char (point-min)) (let (last-end outputs) diff --git a/nix3-transient.el b/nix3-transient.el index ddded8d..3ad7d90 100644 --- a/nix3-transient.el +++ b/nix3-transient.el @@ -34,6 +34,7 @@ (require 'nix3-core) (require 'nix3-utils) (require 'nix3-browse-url) +(require 'pp) (declare-function nix3-realise-and-show-store "nix3") (declare-function nix3-vterm-shell-command "nix3-utils") diff --git a/nix3-utils.el b/nix3-utils.el index a03e453..b6b19bd 100644 --- a/nix3-utils.el +++ b/nix3-utils.el @@ -32,6 +32,8 @@ (require 'cl-lib) (require 'subr-x) (require 'nix3-core) +(eval-when-compile + (require 'rx)) (declare-function vterm "ext:vterm") (declare-function vterm-send-string "ext:vterm")