From d22d004ed9bdc11dbc21be368f90384ed8b1b795 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 23 Oct 2025 00:15:14 -0500 Subject: 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. --- modules/keyboard-macros.el | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'modules/keyboard-macros.el') 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")))) -- cgit v1.2.3