X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=poem-20.el;h=f304951651c16f179366802b5495719d745e9b28;hb=d8361be92de43cd128a0ef9a5e2069fd59d2ddb1;hp=e4e27867419b7d6320522a2579759b2ece1ec408;hpb=dba46404b432c10a5b5c49d0cdd30887591a5faf;p=elisp%2Fapel.git diff --git a/poem-20.el b/poem-20.el index e4e2786..f304951 100644 --- a/poem-20.el +++ b/poem-20.el @@ -70,6 +70,18 @@ code." ;; Returns list of absolute file name and length of data inserted. (insert-file-contents filename visit beg end replace))) +(defun insert-file-contents-as-raw-text-CRLF (filename + &optional visit beg end replace) + "Like `insert-file-contents', q.v., but don't code and format conversion. +Like `insert-file-contents-literary', but it allows find-file-hooks, +automatic uncompression, etc. +Like `insert-file-contents-as-binary', but it converts line-break code +from CRLF to LF." + (let ((coding-system-for-read 'raw-text-dos) + format-alist) + ;; Returns list of absolute file name and length of data inserted. + (insert-file-contents filename visit beg end replace))) + (defun write-region-as-raw-text-CRLF (start end filename &optional append visit lockname) "Like `write-region', q.v., but write as network representation." @@ -78,7 +90,7 @@ code." (defun find-file-noselect-as-binary (filename &optional nowarn rawfile) "Like `find-file-noselect', q.v., but don't code and format conversion." - (let ((coding-system-for-write 'binary) + (let ((coding-system-for-read 'binary) format-alist) (find-file-noselect filename nowarn rawfile))) @@ -89,6 +101,13 @@ except for line-break code." format-alist) (find-file-noselect filename nowarn rawfile))) +(defun find-file-noselect-as-raw-text-CRLF (filename &optional nowarn rawfile) + "Like `find-file-noselect', q.v., but it does not code and format conversion +except for line-break code." + (let ((coding-system-for-read 'raw-text-dos) + format-alist) + (find-file-noselect filename nowarn rawfile))) + (defun save-buffer-as-binary (&optional args) "Like `save-buffer', q.v., but don't encode." (let ((coding-system-for-write 'binary))