diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-29 04:41:40 -0400 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-29 04:41:40 -0400 |
| commit | e1490bce4705cbe161b4d34e84c00e5c6f740beb (patch) | |
| tree | c8eba1858c123f5d76f8a9234723656288987b9d /modules/custom-buffer-file.el | |
| parent | d9763647f85629ffb80ac85b136880ad3b7da627 (diff) | |
| download | dotemacs-e1490bce4705cbe161b4d34e84c00e5c6f740beb.tar.gz dotemacs-e1490bce4705cbe161b4d34e84c00e5c6f740beb.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.el | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/custom-buffer-file.el b/modules/custom-buffer-file.el index b10ecd16..261956f3 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. |
