1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-23 18:47:57 +00:00

Minor tuneup of write-region change

* src/fileio.c (write_region): Use SCHARS, not Flength,
on a value known to be a string.
This commit is contained in:
Paul Eggert 2017-04-07 18:54:39 -07:00
parent c323659344
commit 6fbbfc77d4

View File

@ -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;
}