From 6555f1abebc3c5885a639fe8f825722837557973 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 6 May 2017 13:39:36 +0300 Subject: [PATCH] * src/fileio.c (write_region): Don't say "1 characters". (Bug#26796) --- src/fileio.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/fileio.c b/src/fileio.c index 7f65cf5aaea..ad5ab618b02 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -5151,13 +5151,19 @@ write_region (Lisp_Object start, Lisp_Object end, Lisp_Object filename, if (!auto_saving && !noninteractive) { - AUTO_STRING (format, NUMBERP (append) - ? "Updated `%s' (%d characters)" - : ! NILP (append) - ? "Added to `%s' (%d characters)" - : "Wrote `%s' (%d characters)"); EMACS_INT nchars = (STRINGP (start) ? SCHARS (start) : XINT (end) - XINT (start)); + AUTO_STRING (format, NUMBERP (append) + ? (nchars != 1 + ? "Updated `%s' (%d characters)" + : "Updated `%s' (%d character)") + : ! NILP (append) + ? (nchars != 1 + ? "Added to `%s' (%d characters)" + : "Added to `%s' (%d character)") + : (nchars != 1 + ? "Wrote `%s' (%d characters)" + : "Wrote `%s' (%d character)")); CALLN (Fmessage, format, visit_file, make_number (nchars)); } return Qnil; -- 2.39.2