From a48e9c0c7bc2cbfc3463fd07ba8c9cd3f33ae807 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Tue, 24 Sep 2024 16:17:17 +0100 Subject: [PATCH] diff-apply-buffer: Improve failure message * lisp/vc/diff-mode.el (diff-apply-buffer): Say "hunk", not "hunks", when there was only one failed hunk. (cherry picked from commit ce601de1cafa65d6e6f5ba52e9c794873d164fbd) --- lisp/vc/diff-mode.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index f1193885d6e..49159731e30 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -2092,7 +2092,8 @@ When applying all hunks was successful, then save the changed buffers." (save-buffer))) (message "Saved %d buffers" (length buffer-edits))) (t - (message "%d hunks failed; no buffers changed" failures))))) + (message "%d %s failed; no buffers changed" + failures (if (> failures 1) "hunks" "hunk")))))) (defalias 'diff-mouse-goto-source #'diff-goto-source) -- 2.39.2