From: Eli Zaretskii Date: Sat, 6 May 2017 10:39:36 +0000 (+0300) Subject: * src/fileio.c (write_region): Don't say "1 characters". (Bug#26796) X-Git-Tag: emacs-26.0.90~521^2~457 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6555f1abebc3c5885a639fe8f825722837557973;p=emacs.git * src/fileio.c (write_region): Don't say "1 characters". (Bug#26796) --- 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;