]> git.eshelyaron.com Git - emacs.git/commit
Enable visiting FIFOs as files
authorPo Lu <luangruo@yahoo.com>
Tue, 8 Aug 2023 05:37:00 +0000 (13:37 +0800)
committerPo Lu <luangruo@yahoo.com>
Tue, 8 Aug 2023 05:37:00 +0000 (13:37 +0800)
commit3fb2c174d3a73ee5a2670b438538a5c32ad9d7ac
tree182d8dd2eeeec7711200805aee95b189906b699e
parent594e03526bdc7144216e2f98831e6a7973be393a
Enable visiting FIFOs as files

* doc/lispref/files.texi (Reading from Files): Document new
`if-regular' value of REPLACE.

* etc/NEWS: Announce the new value.

* lisp/files.el (basic-save-buffer-2): Demote errors saving
backup files, since FIFOs cannot be copied.
(revert-buffer-insert-file-contents--default-function): Supply
`if-regular' instead of t as REPLACE.

* src/fileio.c (selinux_enabled_p): New function.
(Fcopy_file, Ffile_selinux_context, Fset_file_selinux_context):
Call that function to ascertain if SELinux applies to a file.
(read_non_regular): Don't assume `emacs_fd_read' always returns
int.
(Finsert_file_contents): If REPLACE is if-regular and FILENAME
is a special non-seekable file, fall back to erasing the buffer
before inserting the contents of that file.
(syms_of_fileio) <Qif_regular>: New symbol.
doc/lispref/files.texi
etc/NEWS
lisp/files.el
src/fileio.c