summaryrefslogtreecommitdiff
path: root/editors/psgml/files/patch-ag
blob: 90792b64da9a0f1c55ee04eb800ed2c3758c45f4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
--- psgml-parse.el.orig	Mon Nov 16 06:45:04 1998
+++ psgml-parse.el	Sat Jan 23 20:28:15 1999
@@ -1217,6 +1217,11 @@
     (sgml-check-dtd-subset)
     (sgml-pop-entity)
     (erase-buffer)
+    ;; For Mule
+    (if (string-match "Emacs 20\." (emacs-version))
+	(set-buffer-file-coding-system 'binary)
+      (if (boundp 'MULE)
+	  (set-file-coding-system *noconv*)))
     (sgml-write-dtd sgml-dtd-info to-file)
     t))
 
@@ -1244,6 +1249,10 @@
   "Merge the binary coded dtd in the current buffer with the current dtd.
 The current dtd is the variable sgml-dtd-info.  Return t if mereged
 was successfull or nil if failed."
+  (if (string-match "Emacs 20\." (emacs-version))
+      (set-buffer-file-coding-system 'binary)
+    (if (boundp 'MULE)
+	(set-file-coding-system *noconv*)))
   (goto-char (point-min))
   (sgml-read-sexp)			; skip filev
   (let ((dependencies (sgml-read-sexp))
@@ -2461,7 +2470,12 @@
     (set-buffer sgml-scratch-buffer)
     ;; For MULE to not misinterpret binary data set the mc-flag
     ;; (reported by Jeffrey Friedl <jfriedl@nff.ncl.omron.co.jp>)
-    (set 'mc-flag nil)			
+    (set 'mc-flag nil)
+    ;; For MULE/Emacs 20 to not misinterpret binary data
+    (if (string-match "Emacs 20\." (emacs-version))
+	(set-buffer-file-coding-system 'binary)
+       (if (boundp 'MULE)
+	   (set-file-coding-system *noconv*)))
     (when (eq sgml-scratch-buffer (default-value 'sgml-scratch-buffer))
       (make-local-variable 'sgml-scratch-buffer)
       (setq sgml-scratch-buffer nil))