emacs-diffs
[Top][All Lists]
Advanced

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

master 59ff342: Mention unibyte issues in insert-file-contents-literally


From: Lars Ingebrigtsen
Subject: master 59ff342: Mention unibyte issues in insert-file-contents-literally doc string
Date: Mon, 13 Sep 2021 09:17:11 -0400 (EDT)

branch: master
commit 59ff342869062caba72af7834c00b36753fa7461
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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).
---
 lisp/files.el | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/lisp/files.el b/lisp/files.el
index 67c4628..821be1e 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,
 due to Emacs features such as format decoding, character code
 conversion, `find-file-hook', automatic uncompression, etc.
 
-This function ensures that none of these modifications will take place."
+This function ensures that none of these modifications will take place.
+
+Unlike `find-file-literally', this function does not make the
+buffer unibyte, so if this function is used when handling
+binary (non-character) data, it can be convenient to make the
+buffer unibyte first.  This isn't, strictly speaking, necessary,
+because multibyte buffers can also deal with raw bytes.  See info
+node `(elisp)Character Codes' for details.")
   (let ((format-alist nil)
        (after-insert-file-functions nil)
        (coding-system-for-read 'no-conversion)



reply via email to

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