summaryrefslogtreecommitdiff
path: root/modules/keyboard-macros.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2025-10-23 00:15:14 -0500
committerCraig Jennings <c@cjennings.net>2025-10-23 00:15:14 -0500
commitd22d004ed9bdc11dbc21be368f90384ed8b1b795 (patch)
treea8ac1f44845bdd11c442cca3c69a51cfde9c1f8b /modules/keyboard-macros.el
parentdb5f40e21b3015c2ce09c9b94e1d14c4ae951b92 (diff)
refactor: unify and simplify key binding setups
Optimized key binding configurations across modules for consistency and reduced redundancy. Improved conditional requiring to handle errors gracefully in `music-config.el`, ensuring robustness across different machine environments. Eliminated comments clutter and adjusted function definitions to adhere to revised standards.
Diffstat (limited to 'modules/keyboard-macros.el')
-rw-r--r--modules/keyboard-macros.el6
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/keyboard-macros.el b/modules/keyboard-macros.el
index a18fd694..5cd89f21 100644
--- a/modules/keyboard-macros.el
+++ b/modules/keyboard-macros.el
@@ -34,9 +34,7 @@
;;; Code:
(require 'subr-x) ;; for string-trim
-
-;; Declare external variable to avoid compile warnings
-(defvar macros-file)
+(eval-when-compile (require 'user-constants))
(defvar cj/macros-loaded nil
"Whether saved keyboard macros have been loaded from file.")
@@ -61,7 +59,7 @@ This function is idempotent and fast when macros are already loaded."
(setq cj/macros-loading nil)))
(defun ensure-macros-file (file)
- "Ensure FILE exists and its first line enables \='lexical-binding\='."
+ "Ensure FILE exists and its first line enables `lexical-binding'."
(unless (file-exists-p file)
(with-temp-file file
(insert ";;; -*- lexical-binding: t -*-\n"))))