diff options
| author | Lars Ingebrigtsen | 2021-09-13 15:17:02 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2021-09-13 15:17:06 +0200 |
| commit | 59ff342869062caba72af7834c00b36753fa7461 (patch) | |
| tree | 3f0dbc597da34f8d6c83c75185f2f721ad20fe99 | |
| parent | e4a187ca5908f5e151fd42b9ab7b72bc5a9bfc2a (diff) | |
| download | emacs-59ff342869062caba72af7834c00b36753fa7461.tar.gz emacs-59ff342869062caba72af7834c00b36753fa7461.zip | |
Mention unibyte issues in insert-file-contents-literally doc string
* lisp/files.el (insert-file-contents-literally): Mention possible
issues with multibyte buffers (bug#50560).
| -rw-r--r-- | lisp/files.el | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el index 67c4628468b..821be1eb2c6 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -2526,7 +2526,14 @@ A buffer may be modified in several ways after reading into the buffer, | |||
| 2526 | due to Emacs features such as format decoding, character code | 2526 | due to Emacs features such as format decoding, character code |
| 2527 | conversion, `find-file-hook', automatic uncompression, etc. | 2527 | conversion, `find-file-hook', automatic uncompression, etc. |
| 2528 | 2528 | ||
| 2529 | This function ensures that none of these modifications will take place." | 2529 | This function ensures that none of these modifications will take place. |
| 2530 | |||
| 2531 | Unlike `find-file-literally', this function does not make the | ||
| 2532 | buffer unibyte, so if this function is used when handling | ||
| 2533 | binary (non-character) data, it can be convenient to make the | ||
| 2534 | buffer unibyte first. This isn't, strictly speaking, necessary, | ||
| 2535 | because multibyte buffers can also deal with raw bytes. See info | ||
| 2536 | node `(elisp)Character Codes' for details.") | ||
| 2530 | (let ((format-alist nil) | 2537 | (let ((format-alist nil) |
| 2531 | (after-insert-file-functions nil) | 2538 | (after-insert-file-functions nil) |
| 2532 | (coding-system-for-read 'no-conversion) | 2539 | (coding-system-for-read 'no-conversion) |