aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJeff Clough2015-02-27 08:52:12 -0500
committerNoam Postavsky2017-04-06 22:23:27 -0400
commitcd0a7951fb762570c4b9c2cdbb43c94cb68910d4 (patch)
tree6870503167bab052b76a22473119286859bdade1 /src
parent4b3db0daa658a9b834284be8c3131b6177a28f38 (diff)
downloademacs-cd0a7951fb762570c4b9c2cdbb43c94cb68910d4.tar.gz
emacs-cd0a7951fb762570c4b9c2cdbb43c94cb68910d4.zip
Output number of characters added to file (Bug#354)
* fileio.c (write_region): * epa-file.el (epa-file-write-region): * jka-compr.el (jka-compr-write-region): * ange-ftp.el (ange-ftp-write-region): * tramp-gvfs.el (tramp-gvfs-handle-write-region): * tramp-sh.el (tramp-sh-handle-write-region): * mm-util.el (mm-append-to-file): Functions now output characters written in addition to file name. * files.texi: Added documentation to write-region and append-to-file describing their output.
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/fileio.c b/src/fileio.c
index acbf76e0d81..0fc52294011 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -5150,13 +5150,16 @@ write_region (Lisp_Object start, Lisp_Object end, Lisp_Object filename,
5150 } 5150 }
5151 5151
5152 if (!auto_saving && !noninteractive) 5152 if (!auto_saving && !noninteractive)
5153 message_with_string ((NUMBERP (append) 5153 {
5154 ? "Updated %s" 5154 AUTO_STRING (format, NUMBERP (append)
5155 : ! NILP (append) 5155 ? "Updated %d characters of `%s'"
5156 ? "Added to %s" 5156 : ! NILP (append)
5157 : "Wrote %s"), 5157 ? "Added %d characters to `%s'"
5158 visit_file, 1); 5158 : "Wrote %d characters to `%s'");
5159 5159 CALLN (Fmessage, format,
5160 make_number (XINT (end) - XINT (start)),
5161 visit_file);
5162 }
5160 return Qnil; 5163 return Qnil;
5161} 5164}
5162 5165