Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

* poem-20.el, poem-ltn1.el, poem-nemacs.el, poem-om.el

(open-network-stream-as-binary): New function.

* poem-e20_2.el (insert-file-contents-as-specified-coding-system):
New function.

* poem-20.el, poem-ltn1.el, poem-nemacs.el, poem-om.el
(write-region-as-specified-coding-system): New function.
(insert-file-contents-as-specified-coding-system): New function.
  • Loading branch information...
commit 27b2dcdd1d9e85d698e9969e12ba83118a766335 1 parent 094a5f2
yamaoka authored
View
25 ChangeLog
@@ -1,28 +1,3 @@
-1998-12-09 Katsumi Yamaoka <yamaoka@jpl.org>
-
- * poem-20.el, poem-e20_2.el, poem-ltn1.el, poem-nemacs.el, poem-om.el
- (find-file-noselect-as-binary): New function.
- (find-file-noselect-as-raw-text): New function.
- (find-file-noselect-as-specified-coding-system): New function.
-
- * poem-nemacs.el (insert-file-contents-as-binary): Call
- `insert-file-contents' with only two args - FILENAME and VISIT.
- (insert-file-contents-as-raw-text): Likewise.
- (insert-file-contents-as-specified-coding-system): Likewise.
-
-1998-12-09 Yuuichi Teranishi <teranisi@gohome.org>
-
- * poe-18.el (make-directory-internal): Rewrite.
-
-1998-12-08 Katsumi Yamaoka <yamaoka@jpl.org>
-
- * poem-20.el (write-region-as-binary): Bind
- `jam-zcat-filename-list' with nil.
- * poem-xm.el (insert-file-contents-as-binary): Likewise.
-
- * poem.el: Require `tcp' if the function `open-network-stream'
- does not exist.
-
1998-12-04 Katsumi Yamaoka <yamaoka@jpl.org>
* poem-20.el, poem-ltn1.el, poem-nemacs.el, poem-om.el
View
9 poe-18.el
@@ -143,10 +143,11 @@ If NEW is a string, that is the `use instead' message."
(defun make-directory-internal (dirname)
"Create a directory. One argument, a file name string.
\[poe-18.el; EMACS 19 emulating function]"
- (let ((dir (expand-file-name dirname)))
- (if (file-exists-p dir)
- (error "Creating directory: %s is already exist" dir)
- (call-process "mkdir" nil nil nil dir))))
+ (if (file-exists-p dirname)
+ (error "Creating directory: %s is already exist" dirname)
+ (if (not (= (call-process "mkdir" nil nil nil dirname) 0))
+ (error "Creating directory: no such file or directory, %s" dirname)
+ )))
(defun make-directory (dir &optional parents)
"Create the directory DIR and any nonexistent parent dirs.
View
27 poem-20.el
@@ -51,7 +51,7 @@
&optional append visit lockname)
"Like `write-region', q.v., but don't encode."
(let ((coding-system-for-write 'binary)
- jka-compr-compression-info-list jam-zcat-filename-list)
+ jka-compr-compression-info-list)
(write-region start end filename append visit lockname)))
;; `insert-file-contents-literally' of Emacs 20 supports
@@ -76,19 +76,6 @@ code."
(let ((coding-system-for-write 'raw-text-dos))
(write-region start end filename append visit lockname)))
-(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)
- format-alist)
- (find-file-noselect filename nowarn rawfile)))
-
-(defun find-file-noselect-as-raw-text (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)
- format-alist)
- (find-file-noselect filename nowarn rawfile)))
-
(defun open-network-stream-as-binary (name buffer host service)
"Like `open-network-stream', q.v., but don't code conversion."
(let ((coding-system-for-read 'binary)
@@ -108,7 +95,8 @@ ARGS must be a coding-system."
format-alist)
(apply 'insert-file-contents filename (nreverse (cdr (nreverse args))))))
-(defun write-region-as-specified-coding-system (start end filename &rest args)
+(defun write-region-as-specified-coding-system (start end filename
+ &rest args)
"Like `write-region', q.v., but code convert by the specified coding-system.
ARGS the optional arguments are passed to `write-region' except for the last
element. The last element of ARGS must be a coding-system."
@@ -117,15 +105,6 @@ element. The last element of ARGS must be a coding-system."
(apply 'write-region start end filename
(nreverse (cdr (nreverse args))))))
-(defun find-file-noselect-as-specified-coding-system (filename &optional args)
- "Like `find-file-noselect', q.v., but code convert by the specified
-coding-system. ARGS the optional arguments are passed to `find-file-noselect'
-except for the last element. The last element of ARGS must be a
-coding-system."
- (let ((coding-system-for-read (car (reverse args)))
- format-alist)
- (apply' find-file-noselect filename (nreverse (cdr (nreverse args))))))
-
;;; @ end
;;;
View
35 poem-e20_2.el
@@ -120,27 +120,6 @@ code."
;; This operation does not change the length.
(set-buffer-multibyte flag))))
-(defun find-file-noselect-as-binary (filename &optional nowarn rawfile)
- "Like `find-file-noselect', q.v., but don't code and format conversion."
- (let ((flag enable-multibyte-characters)
- (coding-system-for-read 'binary)
- format-alist)
- (save-current-buffer
- (prog1
- (set-buffer (find-file-noselect filename nowarn rawfile))
- (set-buffer-multibyte flag)))))
-
-(defun find-file-noselect-as-raw-text (filename &optional nowarn rawfile)
- "Like `find-file-noselect', q.v., but it does not code and format conversion
-except for line-break code."
- (let ((flag enable-multibyte-characters)
- (coding-system-for-read 'raw-text)
- format-alist)
- (save-current-buffer
- (prog1
- (set-buffer (find-file-noselect filename nowarn rawfile))
- (set-buffer-multibyte flag)))))
-
;;; @ with code-conversion
;;;
@@ -158,20 +137,6 @@ ARGS must be a coding-system."
(nreverse (cdr (nreverse args))))
(set-buffer-multibyte flag))))
-(defun find-file-noselect-as-specified-coding-system (filename &optional args)
- "Like `find-file-noselect', q.v., but code convert by the specified
-coding-system. ARGS the optional arguments are passed to `find-file-noselect'
-except for the last element. The last element of ARGS must be a
-coding-system."
- (let ((flag enable-multibyte-characters)
- (coding-system-for-read (car (reverse args)))
- format-alist)
- (save-current-buffer
- (prog1
- (set-buffer (apply' find-file-noselect filename
- (nreverse (cdr (nreverse args)))))
- (set-buffer-multibyte flag)))))
-
;;; @ end
;;;
View
14 poem-ltn1.el
@@ -156,13 +156,6 @@ code conversion will not take place."
(defalias 'insert-file-contents-as-raw-text 'insert-file-contents)
-(defun find-file-noselect-as-binary (filename &optional nowarn rawfile)
- "Like `find-file-noselect', q.v., but don't code and format conversion."
- (let ((emx-binary-mode t))
- (find-file-noselect filename nowarn rawfile)))
-
-(defalias find-file-noselect-as-raw-text 'find-file-noselect)
-
(defun open-network-stream-as-binary (name buffer host service)
"Like `open-network-stream', q.v., but don't code conversion."
(let ((emx-binary-mode t))
@@ -188,13 +181,6 @@ element. The last element of ARGS must be a coding-system."
(apply 'write-region start end filename
(nreverse (cdr (nreverse args))))))
-(defun find-file-noselect-as-specified-coding-system (filename &optional args)
- "Like `find-file-noselect', q.v., but code convert by the specified
-coding-system. ARGS the optional arguments are passed to `find-file-noselect'
-except for the last element. The last element of ARGS must be a
-coding-system."
- (apply' find-file-noselect filename (nreverse (cdr (nreverse args)))))
-
;;; @ character
;;;
View
24 poem-nemacs.el
@@ -200,7 +200,7 @@
\[emu-nemacs.el]"
(as-binary-input-file
;; Returns list absolute file name and length of data inserted.
- (insert-file-contents filename visit)))
+ (insert-file-contents filename visit beg end replace)))
(defun insert-file-contents-as-raw-text (filename
&optional visit beg end replace)
@@ -208,7 +208,7 @@
\[emu-nemacs.el]"
(as-binary-input-file
;; Returns list absolute file name and length of data inserted.
- (insert-file-contents filename visit)))
+ (insert-file-contents filename visit beg end replace)))
(defun write-region-as-raw-text-CRLF (start end filename
&optional append visit lockname)
@@ -222,15 +222,6 @@
(write-region-as-binary (point-min)(point-max)
filename append visit))))
-(defun find-file-noselect-as-binary (filename &optional nowarn rawfile)
- "Like `find-file-noselect', q.v., but don't code conversion."
- (as-binary-input-file (find-file-noselect filename nowarn rawfile)))
-
-(defun find-file-noselect-as-raw-text (filename &optional nowarn rawfile)
- "Like `find-file-noselect', q.v., but it does not code conversion
-except for line-break code."
- (as-binary-input-file (find-file-noselect filename nowarn rawfile)))
-
(defun open-network-stream-as-binary (name buffer host service)
"Like `open-network-stream', q.v., but don't code conversion."
(let ((process (open-network-stream name buffer host service)))
@@ -248,7 +239,7 @@ coding-system. ARGS the optional arguments are passed to
ARGS must be a coding-system."
(let ((kanji-fileio-code (car (reverse args)))
kanji-expected-code)
- (insert-file-contents filename (car (nreverse (cdr (nreverse args)))))))
+ (apply' insert-file-contents filename (nreverse (cdr (nreverse args))))))
(defun write-region-as-specified-coding-system (start end filename
&rest args)
@@ -260,15 +251,6 @@ element. The last element of ARGS must be a coding-system."
(apply 'write-region start end filename
(nreverse (cdr (nreverse args))))))
-(defun find-file-noselect-as-specified-coding-system (filename &optional args)
- "Like `find-file-noselect', q.v., but code convert by the specified
-coding-system. ARGS the optional arguments are passed to `find-file-noselect'
-except for the last element. The last element of ARGS must be a
-coding-system."
- (let ((kanji-fileio-code (car (reverse args)))
- kanji-expected-code)
- (apply' find-file-noselect filename (nreverse (cdr (nreverse args))))))
-
;;; @ buffer representation
;;;
View
25 poem-om.el
@@ -224,23 +224,6 @@ find-file-hooks, etc.
filename append visit))))
))
-(defun find-file-noselect-as-binary (filename &optional nowarn rawfile)
- "Like `find-file-noselect', q.v., but don't code and format conversion."
- (as-binary-input-file (find-file-noselect filename nowarn rawfile)))
-
-(defun find-file-noselect-as-raw-text (filename &optional nowarn rawfile)
- "Like `find-file-noselect', q.v., but it does not code and format conversion
-except for line-break code."
- (save-current-buffer
- (prog1
- (set-buffer (find-file-noselect-as-binary filename nowarn rawfile))
- (let ((flag (buffer-modified-p)))
- (save-excursion
- (goto-char (point-min))
- (while (re-search-forward "\r$" nil t)
- (replace-match "")))
- (set-buffer-modified-p flag)))))
-
(defun open-network-stream-as-binary (name buffer host service)
"Like `open-network-stream', q.v., but don't code conversion."
(let ((process (open-network-stream name buffer host service)))
@@ -287,14 +270,6 @@ coding-system."
(write-region start end filename (car args) (car (cdr args)) code)))
))
-(defun find-file-noselect-as-specified-coding-system (filename &optional args)
- "Like `find-file-noselect', q.v., but code convert by the specified
-coding-system. ARGS the optional arguments are passed to `find-file-noselect'
-except for the last element. The last element of ARGS must be a
-coding-system."
- (let ((file-coding-system-for-read (car (reverse args))))
- (apply' find-file-noselect filename (nreverse (cdr (nreverse args))))))
-
;;; @ buffer representation
;;;
View
1  poem-xm.el
@@ -109,7 +109,6 @@ This function ensures that none of these modifications will take place."
(coding-system-for-read 'binary)
(coding-system-for-write 'binary)
(jka-compr-compression-info-list nil)
- (jam-zcat-filename-list nil)
(find-buffer-file-type-function
(if (fboundp 'find-buffer-file-type)
(symbol-function 'find-buffer-file-type)
View
4 poem.el
@@ -26,10 +26,6 @@
(require 'poe)
-(eval-and-compile
- (unless (fboundp 'open-network-stream)
- (require 'tcp)))
-
(cond ((featurep 'mule)
(cond ((featurep 'xemacs)
(require 'poem-xm)
Please sign in to comment.
Something went wrong with that request. Please try again.