diff options
| author | Noam Postavsky | 2017-05-08 22:17:53 -0400 |
|---|---|---|
| committer | Noam Postavsky | 2017-05-08 23:28:32 -0400 |
| commit | daaec72a82e76f916e639acb51a8ad602433e8a9 (patch) | |
| tree | b58116c69a98c81205307c37f64e737aa70cffb3 /src | |
| parent | 5e2cf8c804fe5fb3f97e0d777c0e0d8efd00b89a (diff) | |
| download | emacs-daaec72a82e76f916e639acb51a8ad602433e8a9.tar.gz emacs-daaec72a82e76f916e639acb51a8ad602433e8a9.zip | |
Revert "Output number of characters added to file (Bug#354)"
The extra message text turned out to be quite annoying in practice,
and is generally more trouble than it's worth. Also revert several
related changes.
Partially revert "Handle `write-region' messages in Tramp properly"
Revert "New var write-region-verbose, default nil"
Revert "* src/fileio.c (write_region): Don't say "1 characters". (Bug#26796)"
Revert "Minor tuneup of write-region change"
Revert "Adjust write-region so file name is at the beginning again"
Revert "Fix handling of non-integer START param to write-region"
Revert "Output number of characters added to file (Bug#354)"
* doc/emacs/files.texi (Misc File Ops):
* etc/NEWS:
* lisp/epa-file.el (epa-file-write-region):
* lisp/gnus/mm-util.el (mm-append-to-file):
* lisp/jka-compr.el (jka-compr-write-region):
* lisp/net/ange-ftp.el (ange-ftp-write-region):
* lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-write-region):
* lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
* lisp/net/tramp-smb.el (tramp-smb-handle-write-region):
* lisp/net/tramp.el (tramp-handle-write-region-message):
* src/fileio.c (write_region, syms_of_fileio):
* test/lisp/net/tramp-tests.el (tramp-test10-write-region): Remove
extra characters from file writing messages.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fileio.c | 35 |
1 files changed, 7 insertions, 28 deletions
diff --git a/src/fileio.c b/src/fileio.c index 6138bfc68bb..acbf76e0d81 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -5150,29 +5150,13 @@ 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 | { | 5153 | message_with_string ((NUMBERP (append) |
| 5154 | EMACS_INT nchars = (STRINGP (start) ? SCHARS (start) | 5154 | ? "Updated %s" |
| 5155 | : XINT (end) - XINT (start)); | 5155 | : ! NILP (append) |
| 5156 | AUTO_STRING (format, | 5156 | ? "Added to %s" |
| 5157 | (NUMBERP (append) | 5157 | : "Wrote %s"), |
| 5158 | ? (NILP (Vwrite_region_verbose) | 5158 | visit_file, 1); |
| 5159 | ? "Updated `%s'" | 5159 | |
| 5160 | : nchars == 1 | ||
| 5161 | ? "Updated `%s' (1 character)" | ||
| 5162 | : "Updated `%s' (%d characters)") | ||
| 5163 | : ! NILP (append) | ||
| 5164 | ? (NILP (Vwrite_region_verbose) | ||
| 5165 | ? "Added to `%s'" | ||
| 5166 | : nchars == 1 | ||
| 5167 | ? "Added to `%s' (1 character)" | ||
| 5168 | : "Added to `%s' (%d characters)") | ||
| 5169 | : (NILP (Vwrite_region_verbose) | ||
| 5170 | ? "Wrote `%s'" | ||
| 5171 | : nchars == 1 | ||
| 5172 | ? "Wrote `%s' (1 character)" | ||
| 5173 | : "Wrote `%s' (%d characters)"))); | ||
| 5174 | CALLN (Fmessage, format, visit_file, make_number (nchars)); | ||
| 5175 | } | ||
| 5176 | return Qnil; | 5160 | return Qnil; |
| 5177 | } | 5161 | } |
| 5178 | 5162 | ||
| @@ -6142,11 +6126,6 @@ These are the annotations made by other annotation functions | |||
| 6142 | that were already called. See also `write-region-annotate-functions'. */); | 6126 | that were already called. See also `write-region-annotate-functions'. */); |
| 6143 | Vwrite_region_annotations_so_far = Qnil; | 6127 | Vwrite_region_annotations_so_far = Qnil; |
| 6144 | 6128 | ||
| 6145 | DEFVAR_LISP ("write-region-verbose", | ||
| 6146 | Vwrite_region_verbose, | ||
| 6147 | doc: /* If non-nil, be more verbose when writing a region. */); | ||
| 6148 | Vwrite_region_verbose = Qnil; | ||
| 6149 | |||
| 6150 | DEFVAR_LISP ("inhibit-file-name-handlers", Vinhibit_file_name_handlers, | 6129 | DEFVAR_LISP ("inhibit-file-name-handlers", Vinhibit_file_name_handlers, |
| 6151 | doc: /* A list of file name handlers that temporarily should not be used. | 6130 | doc: /* A list of file name handlers that temporarily should not be used. |
| 6152 | This applies only to the operation `inhibit-file-name-operation'. */); | 6131 | This applies only to the operation `inhibit-file-name-operation'. */); |