Mercurial > hg > xemacs-beta
comparison lisp/w3/mule-sysdp.el @ 16:0293115a14e9 r19-15b91
Import from CVS: tag r19-15b91
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:49:20 +0200 |
parents | 9ee227acff29 |
children | 441bb1e64a06 |
comparison
equal
deleted
inserted
replaced
15:ad457d5f7d04 | 16:0293115a14e9 |
---|---|
1 ;;; mule-sysdp.el --- consolidate MULE-version dependencies in one file. | 1 ;;; mule-sysdp.el --- consolidate MULE-version dependencies in one file. |
2 | 2 |
3 ;; Copyright (C) 1996 William Perry | 3 ;; Copyright (c) 1996, 1997 William Perry |
4 | 4 |
5 ;; Author: William Perry <wmperry@aventail.com> | 5 ;; Author: William Perry <wmperry@cs.indiana.edu> |
6 ;; Keywords: lisp, tools | 6 ;; Keywords: lisp, tools |
7 | 7 |
8 ;; The purpose of this file is to eliminate the cruftiness that | 8 ;; The purpose of this file is to eliminate the cruftiness that |
9 ;; would otherwise be required of packages that want to run on multiple | 9 ;; would otherwise be required of packages that want to run on multiple |
10 ;; versions of Emacs with and without Mule support. | 10 ;; versions of Emacs with and without Mule support. |
49 (2.4 (detect-coding-region (point-min) (point-max))) | 49 (2.4 (detect-coding-region (point-min) (point-max))) |
50 (xemacs (detect-coding-region (point-min) (point-max))) | 50 (xemacs (detect-coding-region (point-min) (point-max))) |
51 (otherwise nil))) | 51 (otherwise nil))) |
52 | 52 |
53 (defun mule-code-convert-region (st nd code) | 53 (defun mule-code-convert-region (st nd code) |
54 (if (and (listp code) (car code)) | |
55 (setq code (car code))) | |
54 (case mule-sysdep-version | 56 (case mule-sysdep-version |
55 (2.3 | 57 (2.3 |
56 (setq mc-flag t) | 58 (setq mc-flag t) |
57 (code-convert-region (point-min) (point-max) code *internal*) | 59 (code-convert-region (point-min) (point-max) code *internal*) |
58 (set-file-coding-system code)) | 60 (set-file-coding-system code)) |
59 (2.4 | 61 (2.4 |
60 (setq enable-multibyte-characters t) | 62 (setq enable-multibyte-characters t) |
61 (if (eq code 'coding-system-automatic) | 63 (if (memq code '(autodetect coding-system-automatic)) |
62 nil | 64 nil |
63 (decode-coding-region st nd code) | 65 (decode-coding-region st nd code) |
64 (set-buffer-file-coding-system code))) | 66 (set-buffer-file-coding-system code))) |
65 (xemacs | 67 (xemacs |
68 (if (and (listp code) (not (car code))) | |
69 (setq code 'autodetect)) | |
66 (decode-coding-region (point-min) (point-max) code) | 70 (decode-coding-region (point-min) (point-max) code) |
67 (set-file-coding-system code)) | 71 (set-file-coding-system code)) |
68 (otherwise | 72 (otherwise |
69 nil))) | 73 nil))) |
70 | 74 |