aboutsummaryrefslogtreecommitdiff
path: root/modules/custom-comments.el
Commit message (Collapse)AuthorAgeFilesLines
* refactor(custom-editing): five hygiene fixes from the module-by-module re-reviewCraig Jennings2026-05-161-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Guard `cj/duplicate-line-or-region' when COMMENT is non-nil but the current mode has no `comment-start' (e.g. fundamental-mode). Previously the function silently produced malformed output via `comment-region'; now it signals a clear `user-error'. - Factor the `find-file' advice install in external-open.el into `cj/external-open-install-advice'. Same idempotent shape (remove-then-add) but the intent is named. - Add `cj/--validate-decoration-char' in custom-comments.el and wire it into all six divider / border / box helpers. Rejects multi-char strings, empty strings, and control characters like newline/tab that would corrupt subsequent `M-q' flows. Updated the five nil-decoration ERT tests from `:type 'wrong-type-argument' (the old crash signal from `string-to-char' on nil) to `:type 'user-error', since the validator produces a clear message instead of a deep crash. - Extract `cj/--require-spell-checker' in flyspell-and-abbrev.el. Both `cj/flyspell-toggle' and `cj/flyspell-then-abbrev' now call the shared helper; the checker list lives in `cj/--spell-checker-executables', so adding nuspell or any other checker is a one-line edit. - Preserve trailing newlines in custom-ordering output. Both `cj/--arrayify' and `cj/--unarrayify' now detect a trailing newline on the input region and re-append it to the result, matching the pattern custom-text-enclose.el already uses.
* chore(modules): pass validate-modules in batch by adding requiresCraig Jennings2026-05-071-1/+1
| | | | | | | | `make validate-modules` had 19 module-load failures, all the same shape: a module references a symbol or feature owned by another module without saying so. Production was fine because init.el orders requires correctly. The batch target loads each module in isolation, though, and surfaces the gap. I added explicit `(require 'keybindings)` or `(require 'user-constants)` to each affected module. The requires are idempotent at runtime, so production load order is unchanged. For three optional packages (elpa-mirror, mu4e, org-contacts), I switched to `(require 'X nil t)` so the modules load cleanly when those packages aren't installed. The activation calls become no-ops in that case. `make validate-modules` now reports 0 failures.
* feat:which-key: Add descriptive labels for custom keymapsCraig Jennings2025-10-271-1/+12
| | | | | | | | | | | | Enhance which-key integration by providing detailed descriptions for new key bindings across multiple modules. This improves the usability of custom keymaps by clarifying the purpose of each keybinding, making it easier for users to navigate and understand different menus and options available within the configuration. This update ensures that all custom keymaps now display a descriptive label in the which-key popup to explain their functionality, aiding users in identifying keymap purposes promptly.
* feat+test:comments: add 7 comment generation functions and testsCraig Jennings2025-10-261-113/+551
| | | | | | | | | Implement 5 new comment styles (simple-divider, padded-divider, heavy-box, unicode-box, block-banner) and refactor 2 existing functions (inline-border, comment-box) to use interactive/non-interactive pattern for testability. Add 178 tests across 7 test files with validation for length constraints and cross-language support. Fix linter warnings for parameter shadowing and docstring formatting.
* test+fix:comments: add tests for cj/comment-reformat; fix arg issueCraig Jennings2025-10-261-1/+1
| | | | | | | | | | Add 14 unit tests for cj/comment-reformat covering: - Emacs Lisp (12 tests): multiline joining, fill-column restoration, unicode, indentation, empty regions, read-only buffers - Python (1 test): hash-based comments - C (1 test): C-style comments (converted to block style by c-mode Fix issue where cj/comment-reformat was being called with args
* feat: undead-buffers: Add `cj/make-buffer-undead` function and testsCraig Jennings2025-10-221-109/+110
| | | | | | | | | | | | | | | Introduce a new function `cj/make-buffer-undead` that appends a buffer name to the `cj/undead-buffer-list`, preventing it from being killed. This comes along with a suite of tests to check various scenarios and edge cases for handling undead buffers. Additionally, add tests for related functions: `cj/kill-buffer-or-bury-alive`, `cj/kill-buffer-and-window`, and others to ensure they correctly manage buffers, particularly with undead-status considerations. Refactor `undead-buffer-list` naming for consistency and clarity in the module.
* fix(custom-comments): update comment for eval-when-compileCraig Jennings2025-10-201-1/+1
| | | | | | Update eval-when-compile to reference cj/custom-keymap directly, as it's defined in keybindings.el, eliminating the need for requiring the whole fucking keybindings module for key mapping.
* doc: custom-comments: improved commentaryCraig Jennings2025-10-181-2/+13
|
* fix: cj/custom-keymap: string versus symbol issueCraig Jennings2025-10-171-1/+1
|
* custom-comments: optimize startup; remove wip functionCraig Jennings2025-10-171-35/+14
| | | | | - add eval-when-compile and autoload functions to speed startup time - comment user edit needs to be rethought, so removing current wip function
* maint: remaining custom functions grouped into separate modulesCraig Jennings2025-10-121-0/+196