diff options
| author | Craig Jennings <c@cjennings.net> | 2025-10-22 12:27:05 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2025-10-22 12:27:05 -0500 |
| commit | c4e9232f297ffda4443477c589f29052178d2c87 (patch) | |
| tree | f4c50c999bf18a57e08c439ad244b23b006d0730 /modules/custom-file-buffer.el | |
| parent | 2a543ea6a0fd018a24008fba514a6967c3f62cfb (diff) | |
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.
Diffstat (limited to 'modules/custom-file-buffer.el')
| -rw-r--r-- | modules/custom-file-buffer.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/custom-file-buffer.el b/modules/custom-file-buffer.el index e722f734..6ed19d73 100644 --- a/modules/custom-file-buffer.el +++ b/modules/custom-file-buffer.el @@ -23,12 +23,11 @@ (declare-function ps-print-region-with-faces "ps-print") ;; ------------------------- Print Buffer As Postscript ------------------------ -;; prints using postscript for much nicer output (defvar cj/print-spooler-command 'auto "Command used to send PostScript to the system print spooler. -Set to a string to force a specific command (e.g., lpr or lp). -Set to \\='auto to auto-detect once per session.") +Set to a string to force a specific command (e.g., lpr or lp). Set to `auto' to +auto-detect once per session.") (defvar cj/print--spooler-cache nil "Cached spooler command detected for the current Emacs session.") @@ -56,7 +55,6 @@ Set to \\='auto to auto-detect once per session.") (user-error "Invalid value for cj/print-spooler-command: %S" cj/print-spooler-command)))) -;;;###autoload (defun cj/print-buffer-ps (&optional color) "Print the buffer (or active region) as PostScript to the default printer. With prefix argument COLOR, print in color; otherwise print in monochrome. @@ -194,5 +192,9 @@ Do not save the deleted text in the kill ring." "P" #'cj/copy-path-to-buffer-file-as-kill) (keymap-set cj/custom-keymap "b" cj/buffer-and-file-map) +(with-eval-after-load 'which-key + (which-key-add-key-based-replacements "C-; b" "buffer and file menu")) + + (provide 'custom-file-buffer) ;;; custom-file-buffer.el ends here. |
