+1998-12-14 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-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 <yamaoka@jpl.org>
* poem-20.el, poem-e20_2.el, poem-ltn1.el, poem-nemacs.el, poem-om.el
;;; @ 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
;;; @ 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)))))
;;; @ 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
;;; @ 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
;;; @ 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
;;;