summaryrefslogtreecommitdiff
path: root/modules/custom-file-buffer.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2025-10-26 18:14:00 -0500
committerCraig Jennings <c@cjennings.net>2025-10-26 18:14:00 -0500
commit65aec47bf3d949f7401d7b00fd1ee1dd3ee26dd0 (patch)
tree409d9904e040933fd3096cc2bf6146ca4ce94458 /modules/custom-file-buffer.el
parentef1cb62b2323dec7990da89f2de24746c74d49bf (diff)
test+fix:custom-file-buffer: add tests, fix linter warning
Add 58 unit tests for buffer/file utility functions: - cj/copy-link-to-buffer-file (12 tests) - cj/copy-path-to-buffer-file-as-kill (12 tests) - cj/copy-whole-buffer (14 tests) - cj/clear-to-bottom-of-buffer (10 tests) - cj/clear-to-top-of-buffer (10 tests) Tests cover normal cases, boundary cases (unicode, empty buffers, narrowing, read-only buffers), and error cases. Production code change: - Fix linter warning: unused variable 'err' → '_' in cj/move-buffer-and-file
Diffstat (limited to 'modules/custom-file-buffer.el')
-rw-r--r--modules/custom-file-buffer.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/custom-file-buffer.el b/modules/custom-file-buffer.el
index a56edf18..e0224a32 100644
--- a/modules/custom-file-buffer.el
+++ b/modules/custom-file-buffer.el
@@ -108,7 +108,7 @@ Returns t on success, nil if buffer not visiting a file."
When called interactively, prompts for confirmation if target file exists."
(interactive (list (read-directory-name "Move buffer and file (to new directory): ")))
(let* ((target (expand-file-name (buffer-name) (expand-file-name dir))))
- (condition-case err
+ (condition-case _
(cj/--move-buffer-and-file dir nil)
(file-already-exists
(if (yes-or-no-p (format "File %s exists; overwrite? " target))