summaryrefslogtreecommitdiff
path: root/tests/test-wttrin--validate-weather-data.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2025-11-08 11:37:29 -0600
committerCraig Jennings <c@cjennings.net>2025-11-08 11:37:29 -0600
commitf18f1c90e362d84f4978b4365ae0a88807afb6e4 (patch)
treee1c4b0aa7cabc6a118f588da5ede23b94eaec7b6 /tests/test-wttrin--validate-weather-data.el
parent19e88c1ed7ecde966372adefeb3d468374ef1dd7 (diff)
refactor: mode-line: extract inline keymap to shared defvar
Replace inline keymap construction with shared wttrin--mode-line-map defvar. Before (line 474-479): Keymap recreated on every mode-line update - (let ((map (make-sparse-keymap))) ...) - Allocates new keymap object each time - 6 lines of repetitive code After (line 183-190 + line 483): Shared keymap created once - (defvar wttrin--mode-line-map ...) - Reference: 'local-map wttrin--mode-line-map - Single allocation, no repeated construction Added comprehensive tests (8 tests, all passing): - Keymap existence and structure verification - Keybinding tests (mouse-1, mouse-3, no mouse-2) - Integration test verifying mode-line uses shared map Benefits: - More efficient (no allocation on every update) - Clearer code structure - Easier to add new keybindings - Self-documenting with inline documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'tests/test-wttrin--validate-weather-data.el')
0 files changed, 0 insertions, 0 deletions