summaryrefslogtreecommitdiff
path: root/tests/test-wttrin--mode-line-map.el
AgeCommit message (Collapse)Author
2025-11-13refactor: core: rename wttrin-mode-line-favorite-location to ↵HEADmainCraig Jennings
wttrin-favorite-location Renamed variable to remove 'mode-line' prefix, making it usable for future location-based features beyond mode-line display. Updated all references in code, tests, and documentation. All 187 tests passing.
2025-11-08refactor: mode-line: extract inline keymap to shared defvarCraig Jennings
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>