From: Paul Eggert Date: Sat, 8 Apr 2017 01:54:39 +0000 (-0700) Subject: Minor tuneup of write-region change X-Git-Tag: emacs-26.0.90~521^2~681 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6fbbfc77d4071cbc3df86d14f9d21c1fd7a09683;p=emacs.git Minor tuneup of write-region change * src/fileio.c (write_region): Use SCHARS, not Flength, on a value known to be a string. --- 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; }