aboutsummaryrefslogtreecommitdiff
path: root/modules/custom-buffer-file.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-29 04:41:40 -0400
committerCraig Jennings <c@cjennings.net>2026-06-29 04:41:40 -0400
commitca3d447bfd849b54f8f9d74568f3dee1e86c391e (patch)
tree86a1f7d79310cf57ed23b2f5b02be7675badc25e /modules/custom-buffer-file.el
parenta56a714ce30fe91bd5afd0ba181d0d4bc508a8c0 (diff)
downloaddotemacs-ca3d447bfd849b54f8f9d74568f3dee1e86c391e.tar.gz
dotemacs-ca3d447bfd849b54f8f9d74568f3dee1e86c391e.zip
refactor: split custom-misc.el into focused modules
custom-misc.el was an incoherent grab-bag, so anything small defaulted to landing there. I split its eight commands by concern. Three moved into new modules: custom-format (region/buffer reformat), custom-counts (word and character counts), and custom-text-transform (fraction glyphs). The other three went to existing homes: the previous-buffer toggle to custom-buffer-file, the delimiter jump to custom-line-paragraph, and the align-regexp space advice with its alignment and fill bindings to custom-whitespace. The C-; bindings, which-key labels, and the six test files moved with their functions, and custom-misc.el is deleted. No behavior change: every command keeps its name and its C-; key.
Diffstat (limited to 'modules/custom-buffer-file.el')
-rw-r--r--modules/custom-buffer-file.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/custom-buffer-file.el b/modules/custom-buffer-file.el
index b10ecd168..261956f37 100644
--- a/modules/custom-buffer-file.el
+++ b/modules/custom-buffer-file.el
@@ -574,5 +574,14 @@ Signals an error if:
"C-; b <down>" "resize divider down"))
+;; --- previous-buffer toggle (formerly in custom-misc.el) ---
+(defun cj/switch-to-previous-buffer ()
+ "Switch to previously open buffer.
+Repeated invocations toggle between the two most recently open buffers."
+ (interactive)
+ (switch-to-buffer (other-buffer (current-buffer) 1)))
+
+(cj/register-command "SPC" #'cj/switch-to-previous-buffer "prev buffer")
+
(provide 'custom-buffer-file)
;;; custom-buffer-file.el ends here.