mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Allow inserting parts of /dev/urandom with insert-file-contents
* doc/lispref/files.texi (Reading from Files): Document it. * src/fileio.c (Finsert_file_contents): Allow specifying END for special files (bug#18370).
This commit is contained in:
parent
3675809696
commit
cb4579ed6b
3 changed files with 34 additions and 13 deletions
|
|
@ -581,9 +581,12 @@ contents of the file. This is better than simply deleting the buffer
|
|||
contents and inserting the whole file, because (1) it preserves some
|
||||
marker positions and (2) it puts less data in the undo list.
|
||||
|
||||
It is possible to read a special file (such as a FIFO or an I/O device)
|
||||
with @code{insert-file-contents}, as long as @var{replace} and
|
||||
@var{visit} are @code{nil}.
|
||||
It is possible to read a special file (such as a FIFO or an I/O
|
||||
device) with @code{insert-file-contents}, as long as @var{replace},
|
||||
and @var{visit} and @var{beg} are @code{nil}. However, you should
|
||||
normally use an @var{end} argument for these files to avoid inserting
|
||||
(potentially) unlimited data into the buffer (for instance, when
|
||||
inserting data from @file{/dev/urandom}).
|
||||
@end defun
|
||||
|
||||
@defun insert-file-contents-literally filename &optional visit beg end replace
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue