Commit 6fbbfc77 authored by Paul Eggert's avatar Paul Eggert

Minor tuneup of write-region change

* src/fileio.c (write_region): Use SCHARS, not Flength,
on a value known to be a string.
parent c3236593
......@@ -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;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment