summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/elfeed-config.el2
-rw-r--r--modules/media-utils.el5
-rw-r--r--modules/org-agenda-config-debug.el14
-rw-r--r--modules/system-lib.el11
-rw-r--r--modules/system-utils.el12
-rw-r--r--modules/video-audio-recording.el2
-rw-r--r--modules/wrap-up.el2
7 files changed, 20 insertions, 28 deletions
diff --git a/modules/elfeed-config.el b/modules/elfeed-config.el
index 46520be2..52c5b8f1 100644
--- a/modules/elfeed-config.el
+++ b/modules/elfeed-config.el
@@ -15,7 +15,7 @@
;;; Code:
(require 'user-constants)
-(require 'system-utils)
+(require 'system-lib)
(require 'media-utils)
;; ------------------------------- Elfeed Config -------------------------------
diff --git a/modules/media-utils.el b/modules/media-utils.el
index e4eccb5e..db66a71f 100644
--- a/modules/media-utils.el
+++ b/modules/media-utils.el
@@ -25,8 +25,9 @@
;;
;;; Code:
-;; Declare functions and variables from other modules
-(declare-function cj/log-silently "system-utils" (format-string &rest args))
+(require 'system-lib)
+
+;; Declare variables from other modules
(defvar videos-dir) ;; from user-constants.el
;; ------------------------ Default Media Configurations -----------------------
diff --git a/modules/org-agenda-config-debug.el b/modules/org-agenda-config-debug.el
index aded3b6a..a9c713a1 100644
--- a/modules/org-agenda-config-debug.el
+++ b/modules/org-agenda-config-debug.el
@@ -16,19 +16,7 @@
;;; Code:
(require 'user-constants)
-
-;; ---------------------------- Helper Functions -------------------------------
-
-(defun cj/log-silently (format-string &rest args)
- "Append formatted message to *Messages* buffer without echoing.
-FORMAT-STRING and ARGS are passed to `format'.
-This is a local copy of the pattern from system-utils.el."
- (let ((inhibit-read-only t))
- (with-current-buffer (get-buffer-create "*Messages*")
- (goto-char (point-max))
- (unless (bolp) (insert "\n"))
- (insert (apply #'format format-string args))
- (unless (bolp) (insert "\n")))))
+(require 'system-lib)
;; ---------------------------- Debug Functions --------------------------------
diff --git a/modules/system-lib.el b/modules/system-lib.el
index 8bbf8474..4c2f17ef 100644
--- a/modules/system-lib.el
+++ b/modules/system-lib.el
@@ -6,6 +6,7 @@
;;
;; Functions include:
;; - Checking if external programs are available in PATH
+;; - Silent logging to *Messages* buffer
;;
;;; Code:
@@ -16,5 +17,15 @@ PROGRAM should be a string naming an executable program."
(not (string-empty-p program))
(executable-find program)))
+(defun cj/log-silently (format-string &rest args)
+ "Append formatted message (FORMAT-STRING with ARGS) to *Messages* buffer.
+This does so without echoing in the minibuffer."
+ (let ((inhibit-read-only t))
+ (with-current-buffer (get-buffer-create "*Messages*")
+ (goto-char (point-max))
+ (unless (bolp) (insert "\n"))
+ (insert (apply #'format format-string args))
+ (unless (bolp) (insert "\n")))))
+
(provide 'system-lib)
;;; system-lib.el ends here
diff --git a/modules/system-utils.el b/modules/system-utils.el
index d20dd349..2ee7200c 100644
--- a/modules/system-utils.el
+++ b/modules/system-utils.el
@@ -211,18 +211,6 @@ Logs output and exit code to buffer *external-open.log*."
(quick-sdcv-dictionary-prefix-symbol "►")
(quick-sdcv-ellipsis " ▼"))
-;;; -------------------------------- Log Silently -------------------------------
-
-(defun cj/log-silently (format-string &rest args)
- "Append formatted message (FORMAT-STRING with ARGS) to *Messages* buffer.
-This does so without echoing in the minibuffer."
- (let ((inhibit-read-only t))
- (with-current-buffer (get-buffer-create "*Messages*")
- (goto-char (point-max))
- (unless (bolp) (insert "\n"))
- (insert (apply #'format format-string args))
- (unless (bolp) (insert "\n")))))
-
;;; ------------------------------ Process Monitor ------------------------------
(use-package proced
diff --git a/modules/video-audio-recording.el b/modules/video-audio-recording.el
index 62a5f13e..b3151dba 100644
--- a/modules/video-audio-recording.el
+++ b/modules/video-audio-recording.el
@@ -64,6 +64,8 @@
;;
;;; Code:
+(require 'system-lib)
+
;; Forward declarations
(eval-when-compile (defvar video-recordings-dir))
(eval-when-compile (defvar audio-recordings-dir))
diff --git a/modules/wrap-up.el b/modules/wrap-up.el
index b00d56a8..523d55b2 100644
--- a/modules/wrap-up.el
+++ b/modules/wrap-up.el
@@ -5,6 +5,8 @@
;;; Code:
+(require 'system-lib)
+
;; -------------------------------- Bury Buffers -------------------------------
;; wait a few seconds then bury compile-related buffers.