From c4e9232f297ffda4443477c589f29052178d2c87 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Wed, 22 Oct 2025 12:27:05 -0500 Subject: feat: undead-buffers: Add `cj/make-buffer-undead` function and tests 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. --- modules/custom-case.el | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'modules/custom-case.el') diff --git a/modules/custom-case.el b/modules/custom-case.el index 75ceb184..4fd9ac05 100644 --- a/modules/custom-case.el +++ b/modules/custom-case.el @@ -40,12 +40,11 @@ (defun cj/title-case-region () "Capitalize the region in title case format. -Title case is a capitalization convention where major words -are capitalized,and most minor words are lowercase. Nouns, -verbs (including linking verbs), adjectives, adverbs,pronouns, -and all words of four letters or more are considered major words. -Short (i.e., three letters or fewer) conjunctions, short prepositions, -and all articles are considered minor words." +Title case is a capitalization convention where major words are capitalized, +and most minor words are lowercase. Nouns, verbs (including linking verbs), +adjectives, adverbs,pronouns, and all words of four letters or more are +considered major words. Short (i.e., three letters or fewer) conjunctions, +short prepositions, and all articles are considered minor words." (interactive) (let ((beg nil) (end nil) @@ -112,11 +111,14 @@ and all articles are considered minor words." ;; Case-change operations prefix and keymap (defvar-keymap cj/case-map - :doc "Keymap for case-change operations." + :doc "Keymap for case-change operations" "t" #'cj/title-case-region "u" #'cj/upcase-dwim "l" #'cj/downcase-dwim) (keymap-set cj/custom-keymap "c" cj/case-map) +(with-eval-after-load 'which-key + (which-key-add-key-based-replacements "C-; c" "case change menu")) + (provide 'custom-case) ;;; custom-case.el ends here. -- cgit v1.2.3