From 6fbbfc77d4071cbc3df86d14f9d21c1fd7a09683 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 7 Apr 2017 18:54:39 -0700 Subject: [PATCH] Minor tuneup of write-region change * src/fileio.c (write_region): Use SCHARS, not Flength, on a value known to be a string. --- src/fileio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fileio.c b/src/fileio.c index fc853f26673..7f65cf5aaea 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -5156,9 +5156,9 @@ write_region (Lisp_Object start, Lisp_Object end, Lisp_Object filename, : ! NILP (append) ? "Added to `%s' (%d characters)" : "Wrote `%s' (%d characters)"); - CALLN (Fmessage, format, visit_file, - (STRINGP (start) ? Flength (start) - : make_number (XINT (end) - XINT (start)))); + EMACS_INT nchars = (STRINGP (start) ? SCHARS (start) + : XINT (end) - XINT (start)); + CALLN (Fmessage, format, visit_file, make_number (nchars)); } return Qnil; } -- 2.39.2