emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 6fbbfc7 1/3: Minor tuneup of write-region change


From: Paul Eggert
Subject: [Emacs-diffs] master 6fbbfc7 1/3: Minor tuneup of write-region change
Date: Fri, 7 Apr 2017 21:54:45 -0400 (EDT)

branch: master
commit 6fbbfc77d4071cbc3df86d14f9d21c1fd7a09683
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    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 fc853f2..7f65cf5 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;
 }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]