diff options
| author | Paul Eggert | 2017-04-07 18:54:39 -0700 |
|---|---|---|
| committer | Paul Eggert | 2017-04-07 18:54:39 -0700 |
| commit | 6fbbfc77d4071cbc3df86d14f9d21c1fd7a09683 (patch) | |
| tree | 0ae96ec4549527133dc56fdf6c7ab904ac5d3b31 | |
| parent | c323659344ba4db7a0b074b2e29d0a5f33d5eb80 (diff) | |
| download | emacs-6fbbfc77d4071cbc3df86d14f9d21c1fd7a09683.tar.gz emacs-6fbbfc77d4071cbc3df86d14f9d21c1fd7a09683.zip | |
Minor tuneup of write-region change
* src/fileio.c (write_region): Use SCHARS, not Flength,
on a value known to be a string.
| -rw-r--r-- | src/fileio.c | 6 |
1 files 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, | |||
| 5156 | : ! NILP (append) | 5156 | : ! NILP (append) |
| 5157 | ? "Added to `%s' (%d characters)" | 5157 | ? "Added to `%s' (%d characters)" |
| 5158 | : "Wrote `%s' (%d characters)"); | 5158 | : "Wrote `%s' (%d characters)"); |
| 5159 | CALLN (Fmessage, format, visit_file, | 5159 | EMACS_INT nchars = (STRINGP (start) ? SCHARS (start) |
| 5160 | (STRINGP (start) ? Flength (start) | 5160 | : XINT (end) - XINT (start)); |
| 5161 | : make_number (XINT (end) - XINT (start)))); | 5161 | CALLN (Fmessage, format, visit_file, make_number (nchars)); |
| 5162 | } | 5162 | } |
| 5163 | return Qnil; | 5163 | return Qnil; |
| 5164 | } | 5164 | } |