From 3613769644366ad1db85be8210dd6f37f4ef06fd Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Mon, 3 Nov 2025 15:56:18 -0600 Subject: chore: Remove unused go-ts-mode-map forward declarations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cleanup of already-fixed issue from commit e286f96. **Background:** - Bug was already fixed on Nov 2, 2025 (commit e286f96) - Original error: "void-variable go-ts-mode-map" - Fix moved keybindings from :bind clause to hook function - Keybindings now set after mode loads via cj/go-mode-keybindings **This Cleanup:** - Removed unused forward declarations (lines 34-35): - (defvar go-ts-mode-map) - (defvar go-mod-ts-mode-map) - These were artifacts from the original buggy implementation - No longer needed since keybindings use local-set-key in hook **Testing:** - ✓ File compiles cleanly without warnings - ✓ No references to these variables exist in codebase - ✓ Keybindings work correctly via hook function Updated todo.org to mark task as complete, documenting that it was already fixed and today's work was just cleanup. Serves Method 1: "Make Using Emacs Frictionless" - Quick win: ~2 minutes (just cleanup) - Reduces code clutter --- todo.org | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'todo.org') diff --git a/todo.org b/todo.org index c71a1508..10e555b4 100644 --- a/todo.org +++ b/todo.org @@ -57,11 +57,20 @@ CLOSED: [2025-10-31 Fri] Bound to C-; b D. Weekly need satisfied. -** TODO [#B] Fix go-ts-mode-map keybinding error (void-variable) +** DONE [#B] Fix go-ts-mode-map keybinding error (void-variable) +CLOSED: [2025-11-03 Sun] Error: "Debugger entered--Lisp error: (void-variable go-ts-mode-map)" Location: modules/prog-go.el - trying to bind keys before mode loads. -Fix: Wrap keybinding in with-eval-after-load or check if variable is bound. + +✅ Already fixed in commit 196b289 (Nov 2, 2025) +- Moved keybinding from `:bind (:map go-ts-mode-map ...)` to hook function +- Keybinding now set in `cj/go-mode-keybindings` called via `:hook` +- Function executes after mode loads, ensuring keymap exists +- Today's cleanup: Removed unused forward declarations (lines 34-35) + +Fix was: Wrap keybinding in hook function instead of :bind clause. +Result: No more void-variable error, keybinding works correctly. ** TODO [#B] Fix org-noter (reading/annotation workflow currently "so painful") -- cgit v1.2.3