>>>> "APA" == Adrian Aichner
<Adrian.Aichner(a)t-online.de> writes:
Should I test for
(or (featurep 'file-coding) (featurep 'mule))
instead?
Here's the ChangeLog for the current patch:
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/ChangeLog,v
retrieving revision 1.357
diff -u -u -r1.357 ChangeLog
--- ChangeLog 2002/02/12 14:24:39 1.357
+++ ChangeLog 2002/02/27 20:56:46
@@ -1,3 +1,17 @@
+2002-02-27 Adrian Aichner <adrian(a)xemacs.org>
+
+ * files.el (find-file): Test for file-coding feature before using
+ it.
+ * files.el (find-file-other-window): Done.
+ * files.el (find-file-other-frame): Done.
+ * files.el (find-file-read-only): Done.
+ * files.el (find-file-read-only-other-window): Done.
+ * files.el (find-file-read-only-other-frame): Done.
+ * files.el (find-alternate-file): Done.
+ * files.el (write-file): Done.
+ * files.el (insert-file): Done.
+ * files.el (append-to-file): Done.
+
APA> I am not commiting this before I getting an expert opinion on the
APA> correctness of this fix for:
> From: "Christian Nybø" <ch.qr(a)nybo.no>
> Subject: set-coding-system undefined
> To: xemacs-beta(a)xemacs.org
> Date: Wed, 27 Feb 2002 19:14:23 +0100
> Message-Id: <E16g8at-0002GR-00@lapchr>
APA> Best regards,
APA> Adrian
APA> xemacs-21.5 Patch (cvs -f -z3 -q diff -u lisp/files.el):
APA> Index: lisp/files.el
APA> ===================================================================
APA> RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/files.el,v
APA> retrieving revision 1.46
APA> diff -u -r1.46 files.el
APA> --- lisp/files.el 2002/01/10 00:24:29 1.46
APA> +++ lisp/files.el 2002/02/27 20:24:52
APA> @@ -605,7 +605,7 @@
APA> coding system to use when decoding the file. Interactively,
APA> with a prefix argument, you will be prompted for the coding system."
APA> (interactive "FFind file: \nZCoding system: ")
APA> - (if codesys
APA> + (if (and codesys (featurep 'file-coding))
APA> (let ((coding-system-for-read
APA> (get-coding-system codesys)))
APA> (switch-to-buffer (find-file-noselect filename)))
APA> @@ -619,7 +619,7 @@
APA> coding system to use when decoding the file. Interactively,
APA> with a prefix argument, you will be prompted for the coding system."
APA> (interactive "FFind file in other window: \nZCoding system: ")
APA> - (if codesys
APA> + (if (and codesys (featurep 'file-coding))
APA> (let ((coding-system-for-read
APA> (get-coding-system codesys)))
APA> (switch-to-buffer-other-window (find-file-noselect filename)))
APA> @@ -631,7 +631,7 @@
APA> coding system to use when decoding the file. Interactively,
APA> with a prefix argument, you will be prompted for the coding system."
APA> (interactive "FFind file in other frame: \nZCoding system: ")
APA> - (if codesys
APA> + (if (and codesys (featurep 'file-coding))
APA> (let ((coding-system-for-read
APA> (get-coding-system codesys)))
APA> (switch-to-buffer-other-frame (find-file-noselect filename)))
APA> @@ -645,7 +645,7 @@
APA> coding system to use when decoding the file. Interactively,
APA> with a prefix argument, you will be prompted for the coding system."
APA> (interactive "fFind file read-only: \nZCoding system: ")
APA> - (if codesys
APA> + (if (and codesys (featurep 'file-coding))
APA> (let ((coding-system-for-read
APA> (get-coding-system codesys)))
APA> (find-file filename))
APA> @@ -661,7 +661,7 @@
APA> coding system to use when decoding the file. Interactively,
APA> with a prefix argument, you will be prompted for the coding system."
APA> (interactive "fFind file read-only other window: \nZCoding system:
")
APA> - (if codesys
APA> + (if (and codesys (featurep 'file-coding))
APA> (let ((coding-system-for-read
APA> (get-coding-system codesys)))
APA> (find-file-other-window filename))
APA> @@ -677,7 +677,7 @@
APA> coding system to use when decoding the file. Interactively,
APA> with a prefix argument, you will be prompted for the coding system."
APA> (interactive "fFind file read-only other frame: \nZCoding system:
")
APA> - (if codesys
APA> + (if (and codesys (featurep 'file-coding))
APA> (let ((coding-system-for-read
APA> (get-coding-system codesys)))
APA> (find-file-other-frame filename))
APA> @@ -748,7 +748,7 @@
APA> (unwind-protect
APA> (progn
APA> (unlock-buffer)
APA> - (if codesys
APA> + (if (and codesys (featurep 'file-coding))
APA> (let ((coding-system-for-read
APA> (get-coding-system codesys)))
APA> (find-file filename))
APA> @@ -1919,7 +1919,7 @@
APA> (set-visited-file-name filename)))
APA> (set-buffer-modified-p t)
APA> (setq buffer-read-only nil)
APA> - (if codesys
APA> + (if (and codesys (featurep 'file-coding))
APA> (let ((buffer-file-coding-system (get-coding-system codesys)))
APA> (save-buffer))
APA> (save-buffer)))
APA> @@ -2592,7 +2592,7 @@
APA> (signal 'file-error (list "Opening input file" "file
is a directory"
APA> filename)))
APA> (let ((tem
APA> - (if codesys
APA> + (if (and codesys (featurep 'file-coding))
APA> (let ((coding-system-for-read
APA> (get-coding-system codesys)))
APA> (insert-file-contents filename))
APA> @@ -2608,7 +2608,7 @@
APA> coding system to use when encoding the file. Interactively,
APA> with a prefix argument, you will be prompted for the coding system."
APA> (interactive "r\nFAppend to file: \nZCoding system: ")
APA> - (if codesys
APA> + (if (and codesys (featurep 'file-coding))
APA> (let ((buffer-file-coding-system (get-coding-system codesys)))
APA> (write-region start end filename t))
APA> (write-region start end filename t)))
APA> --
APA> Adrian Aichner
APA> mailto:adrian@xemacs.org
APA>
http://www.xemacs.org/
--
Adrian Aichner
mailto:adrian@xemacs.org
http://www.xemacs.org/