+2001-06-25 Bruno Haible <haible@clisp.cons.org>
+
+ * po-mode.el (po-find-file-coding-system): Make it work in XEmacs 20
+ as well. Based on a patch by Enrico Scholz
+ <enrico.scholz@informatik.tu-chemnitz.de>.
+
2001-05-23 Bruno Haible <haible@clisp.cons.org>
* gettext-0.10.38 released.
;;; Mode activation.
(eval-and-compile
- (if po-EMACS20
-
- (defun po-find-file-coding-system (arg-list)
+ (if (or po-EMACS20 po-XEMACS)
+ (defun po-find-file-coding-system-guts (operation filename)
"Return a Mule (DECODING . ENCODING) pair, according to PO file charset.
Called through file-coding-system-alist, before the file is visited for real."
- (and (eq (car arg-list) 'insert-file-contents)
+ (and (eq operation 'insert-file-contents)
(with-temp-buffer
(let ((coding-system-for-read 'no-conversion))
;; Is 4096 enough? FIXME: Retry as needed!
- (insert-file-contents (nth 1 arg-list) nil 0 4096)
+ (insert-file-contents filename nil 0 4096)
(if (re-search-forward
"^\"Content-Type: text/plain;[ \t]*charset=\\([^\\]+\\)"
nil t)
(if (memq charset-lower (coding-system-list))
charset-lower
'no-conversion))))
- '(no-conversion))))))
+ '(no-conversion)))))))
+
+ (if po-EMACS20
+ (defun po-find-file-coding-system (arg-list)
+ "Return a Mule (DECODING . ENCODING) pair, according to PO file charset.
+Called through file-coding-system-alist, before the file is visited for real."
+ (po-find-file-coding-system-guts (car arg-list) (car (cdr arg-list)))))
+
+ (if po-XEMACS
+ (defun po-find-file-coding-system (operation filename)
+ "Return a Mule (DECODING . ENCODING) pair, according to PO file charset.
+Called through file-coding-system-alist, before the file is visited for real."
+ (po-find-file-coding-system-guts operation filename)))
- ))
+ )
(defvar po-mode-map nil
"Keymap for PO mode.")