From: yamaoka Date: Mon, 14 Dec 1998 01:57:07 +0000 (+0000) Subject: * poem-20.el, poem-e20_2.el, poem-ltn1.el, poem-nemacs.el, poem-om.el X-Git-Tag: apel-199812141900~2 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=a2528c3c1b7aa607b3600ca03c9fcf2dcb310eec;p=elisp%2Fapel.git * poem-20.el, poem-e20_2.el, poem-ltn1.el, poem-nemacs.el, poem-om.el (find-file-noselect-as-coding-system): Renamed from `find-file-noselect-as-specified-coding-system'. * poem-e20_2.el (insert-file-contents-as-coding-system): Renamed from `insert-file-contents-as-specified-coding-system'. * poem-20.el, poem-ltn1.el, poem-nemacs.el, poem-om.el (write-region-as-coding-system): Renamed from `write-region-as-specified-coding-system'. (insert-file-contents-as-coding-system): Renamed from `insert-file-contents-as-specified-coding-system'. --- diff --git a/ChangeLog b/ChangeLog index 4c07a17..9ce7e3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +1998-12-14 Katsumi Yamaoka + + * poem-20.el, poem-e20_2.el, poem-ltn1.el, poem-nemacs.el, poem-om.el + (find-file-noselect-as-coding-system): Renamed from + `find-file-noselect-as-specified-coding-system'. + + * poem-e20_2.el (insert-file-contents-as-coding-system): Renamed + from `insert-file-contents-as-specified-coding-system'. + + * poem-20.el, poem-ltn1.el, poem-nemacs.el, poem-om.el + (write-region-as-coding-system): Renamed from + `write-region-as-specified-coding-system'. + (insert-file-contents-as-coding-system): Renamed from + `insert-file-contents-as-specified-coding-system'. + 1998-12-09 Katsumi Yamaoka * poem-20.el, poem-e20_2.el, poem-ltn1.el, poem-nemacs.el, poem-om.el diff --git a/poem-20.el b/poem-20.el index 1052dd8..5fc0a39 100644 --- a/poem-20.el +++ b/poem-20.el @@ -99,32 +99,29 @@ except for line-break code." ;;; @ with code-conversion ;;; -(defun insert-file-contents-as-specified-coding-system (filename &rest args) - "Like `insert-file-contents', q.v., but code convert by the specified -coding-system. ARGS the optional arguments are passed to -`insert-file-contents' except for the last element. The last element of -ARGS must be a coding-system." - (let ((coding-system-for-read (car (reverse args))) +(defun insert-file-contents-as-coding-system + (filename coding-system &optional visit beg end replace) + "Like `insert-file-contents', q.v., but CODING-SYSTEM the second arg will +be applied to `coding-system-for-read'." + (let ((coding-system-for-read coding-system) format-alist) - (apply 'insert-file-contents filename (nreverse (cdr (nreverse args)))))) + (insert-file-contents filename visit beg end replace))) -(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." - (let ((coding-system-for-write (car (reverse args))) +(defun write-region-as-coding-system (start end filename coding-system + &optional append visit lockname) + "Like `write-region', q.v., but CODING-SYSTEM the fourth arg will be +applied to `coding-system-for-write'." + (let ((coding-system-for-write coding-system) jka-compr-compression-info-list jam-zcat-filename-list) - (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))) + (write-region start end filename append visit lockname))) + +(defun find-file-noselect-as-coding-system (filename coding-system + &optional nowarn rawfile) + "Like `find-file-noselect', q.v., but CODING-SYSTEM the second arg will +be applied to `coding-system-for-read'." + (let ((coding-system-for-read coding-system) format-alist) - (apply' find-file-noselect filename (nreverse (cdr (nreverse args)))))) + (find-file-noselect filename nowarn rawfile))) ;;; @ end diff --git a/poem-e20_2.el b/poem-e20_2.el index 77a3ee5..e4cf3b5 100644 --- a/poem-e20_2.el +++ b/poem-e20_2.el @@ -145,31 +145,27 @@ except for line-break code." ;;; @ with code-conversion ;;; -(defun insert-file-contents-as-specified-coding-system (filename &rest args) - "Like `insert-file-contents', q.v., but code convert by the specified -coding-system. ARGS the optional arguments are passed to -`insert-file-contents' except for the last element. The last element of -ARGS must be a coding-system." +(defun insert-file-contents-as-coding-system + (filename coding-system &optional visit beg end replace) + "Like `insert-file-contents', q.v., but CODING-SYSTEM the second arg will +be applied to `coding-system-for-read'." (let ((flag enable-multibyte-characters) - (coding-system-for-read (car (reverse args))) + (coding-system-for-read coding-system) format-alist) (prog1 - (apply 'insert-file-contents filename - (nreverse (cdr (nreverse args)))) + (insert-file-contents filename visit beg end replace) (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." +(defun find-file-noselect-as-coding-system (filename coding-system + &optional nowarn rawfile) + "Like `find-file-noselect', q.v., but CODING-SYSTEM the second arg will +be applied to `coding-system-for-read'." (let ((flag enable-multibyte-characters) - (coding-system-for-read (car (reverse args))) + (coding-system-for-read coding-system) format-alist) (save-current-buffer (prog1 - (set-buffer (apply' find-file-noselect filename - (nreverse (cdr (nreverse args))))) + (set-buffer (find-file-noselect filename nowarn rawfile)) (set-buffer-multibyte flag))))) diff --git a/poem-ltn1.el b/poem-ltn1.el index 6a25c2e..aa0d3b8 100644 --- a/poem-ltn1.el +++ b/poem-ltn1.el @@ -172,28 +172,24 @@ code conversion will not take place." ;;; @ with code-conversion (but actually it might be not done) ;;; -(defun insert-file-contents-as-specified-coding-system (filename &rest args) - "Like `insert-file-contents', q.v., but code convert by the specified -coding-system. ARGS the optional arguments are passed to -`insert-file-contents' except for the last element. The last element of -ARGS must be a coding-system." - (apply 'insert-file-contents filename (nreverse (cdr (nreverse 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." +(defun insert-file-contents-as-coding-system + (filename coding-system &optional visit beg end replace) + "Like `insert-file-contents', q.v., but CODING-SYSTEM the second arg will +be applied to `coding-system-for-read'." + (insert-file-contents filename visit beg end replace)) + +(defun write-region-as-coding-system (start end filename coding-system + &optional append visit lockname) + "Like `write-region', q.v., but CODING-SYSTEM the fourth arg will be +applied to `coding-system-for-write'." (let (jka-compr-compression-info-list jam-zcat-filename-list) - (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))))) + (write-region start end filename append visit lockname))) + +(defun find-file-noselect-as-coding-system (filename coding-system + &optional nowarn rawfile) + "Like `find-file-noselect', q.v., but CODING-SYSTEM the second arg will +be applied to `coding-system-for-read'." + (find-file-noselect filename nowarn rawfile)) ;;; @ character diff --git a/poem-nemacs.el b/poem-nemacs.el index 66b1cc5..9c4c825 100644 --- a/poem-nemacs.el +++ b/poem-nemacs.el @@ -241,33 +241,29 @@ except for line-break code." ;;; @ with code-conversion ;;; -(defun insert-file-contents-as-specified-coding-system (filename &rest args) - "Like `insert-file-contents', q.v., but code convert by the specified -coding-system. ARGS the optional arguments are passed to -`insert-file-contents' except for the last element. The last element of -ARGS must be a coding-system." - (let ((kanji-fileio-code (car (reverse args))) +(defun insert-file-contents-as-coding-system + (filename coding-system &optional visit beg end replace) + "Like `insert-file-contents', q.v., but CODING-SYSTEM the second arg will +be applied to `coding-system-for-read'." + (let ((kanji-fileio-code coding-system) kanji-expected-code) - (insert-file-contents filename (car (nreverse (cdr (nreverse 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." - (let ((kanji-fileio-code (car (reverse args))) + (insert-file-contents filename visit))) + +(defun write-region-as-coding-system (start end filename coding-system + &optional append visit lockname) + "Like `write-region', q.v., but CODING-SYSTEM the fourth arg will be +applied to `coding-system-for-write'." + (let ((kanji-fileio-code coding-system) jka-compr-compression-info-list jam-zcat-filename-list) - (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))) + (write-region start end filename append visit))) + +(defun find-file-noselect-as-coding-system (filename coding-system + &optional nowarn rawfile) + "Like `find-file-noselect', q.v., but CODING-SYSTEM the second arg will +be applied to `coding-system-for-read'." + (let ((kanji-fileio-code coding-system) kanji-expected-code) - (apply' find-file-noselect filename (nreverse (cdr (nreverse args)))))) + (find-file-noselect filename nowarn))) ;;; @ buffer representation diff --git a/poem-om.el b/poem-om.el index 2b64f96..babc229 100644 --- a/poem-om.el +++ b/poem-om.el @@ -251,50 +251,47 @@ except for line-break code." ;;; @ with code-conversion ;;; -(defun insert-file-contents-as-specified-coding-system (filename &rest args) - "Like `insert-file-contents', q.v., but code convert by the specified -coding-system. ARGS the optional arguments are passed to -`insert-file-contents' 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 'insert-file-contents filename (nreverse (cdr (nreverse args)))))) +(defun insert-file-contents-as-coding-system + (filename coding-system &optional visit beg end replace) + "Like `insert-file-contents', q.v., but CODING-SYSTEM the second arg will +be applied to `coding-system-for-read'." + (let ((file-coding-system-for-read coding-system)) + (insert-file-contents filename visit beg end replace))) (cond (running-emacs-19_29-or-later ;; for MULE 2.3 based on Emacs 19.34. - (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." - (let ((file-coding-system (car (reverse args))) - jka-compr-compression-info-list jam-zcat-filename-list) - (apply 'write-region start end filename - (nreverse (cdr (nreverse args)))))) + (defun write-region-as-coding-system (start end filename coding-system + &optional append visit lockname) + "Like `write-region', q.v., but CODING-SYSTEM the fourth arg will be +applied to `coding-system-for-write'." + (let (jka-compr-compression-info-list jam-zcat-filename-list) + (write-region start end filename append visit lockname coding-system))) + + (defun find-file-noselect-as-coding-system + (filename coding-system &optional nowarn rawfile) + "Like `find-file-noselect', q.v., but CODING-SYSTEM the second arg will +be applied to `coding-system-for-read'." + (let ((file-coding-system-for-read coding-system)) + (find-file-noselect filename nowarn rawfile))) ) (t ;; for MULE 2.3 based on Emacs 19.28. - (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." - (let ((code (car (reverse args))) - (args (nreverse (cdr (nreverse args)))) - jka-compr-compression-info-list jam-zcat-filename-list) - (write-region start end filename (car args) (car (cdr args)) code))) + (defun write-region-as-coding-system (start end filename coding-system + &optional append visit lockname) + "Like `write-region', q.v., but CODING-SYSTEM the fourth arg will be +applied to `coding-system-for-write'." + (let (jka-compr-compression-info-list jam-zcat-filename-list) + (write-region start end filename append visit coding-system))) + + (defun find-file-noselect-as-coding-system + (filename coding-system &optional nowarn rawfile) + "Like `find-file-noselect', q.v., but CODING-SYSTEM the second arg will +be applied to `coding-system-for-read'." + (let ((file-coding-system-for-read coding-system)) + (find-file-noselect filename nowarn))) )) -(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 ;;;