comparison lisp/tl/emu-x20.el @ 110:fe104dbd9147 r20-1b7

Import from CVS: tag r20-1b7
author cvs
date Mon, 13 Aug 2007 09:19:45 +0200
parents 0d2f883870bc
children 8619ce7e4c50
comparison
equal deleted inserted replaced
109:e183fc049578 110:fe104dbd9147
1 ;;; emu-x20.el --- emu API implementation for XEmacs 20 with mule 1 ;;; emu-x20.el --- emu API implementation for XEmacs 20 with mule
2 2
3 ;; Copyright (C) 1994,1995,1996,1997 MORIOKA Tomohiko 3 ;; Copyright (C) 1994,1995,1996,1997 MORIOKA Tomohiko
4 4
5 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> 5 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
6 ;; Version: $Id: emu-x20.el,v 1.4 1997/02/15 22:21:24 steve Exp $ 6 ;; Version: $Id: emu-x20.el,v 1.5 1997/03/16 03:05:43 steve Exp $
7 ;; Keywords: emulation, compatibility, Mule, XEmacs 7 ;; Keywords: emulation, compatibility, Mule, XEmacs
8 8
9 ;; This file is part of XEmacs. 9 ;; This file is part of XEmacs.
10 10
11 ;; This program is free software; you can redistribute it and/or 11 ;; This program is free software; you can redistribute it and/or
21 ;; You should have received a copy of the GNU General Public License 21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU XEmacs; see the file COPYING. If not, write to the 22 ;; along with GNU XEmacs; see the file COPYING. If not, write to the
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, 23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 ;; Boston, MA 02111-1307, USA. 24 ;; Boston, MA 02111-1307, USA.
25 25
26 ;;; Commentary:
27
28 ;; This module requires XEmacs 20.1 b6 or later with mule.
29
30 ;;; Commentary:
31
32 ;; This module requires XEmacs 20.1 b6 or later with mule.
33
26 ;;; Code: 34 ;;; Code:
27 35
28 (require 'cyrillic) 36 (require 'cyrillic)
29 (require 'emu-xemacs) 37 (require 'emu-xemacs)
30 38
31 39
32 ;;; @ coding-system 40 ;;; @ coding-system
33 ;;; 41 ;;;
34 42
35 (defconst *noconv* 'no-conversion) 43 (defconst *noconv* 'no-conversion)
36 (defconst *ctext* 'ctext)
37 (defconst *hz* 'hz)
38 (defconst *big5* 'big5)
39 (defconst *euc-kr* 'euc-kr)
40 (defconst *koi8* 'koi8)
41
42 (defalias 'set-buffer-file-coding-system 'set-file-coding-system)
43 44
44 (defmacro as-binary-process (&rest body) 45 (defmacro as-binary-process (&rest body)
45 `(let (selective-display ; Disable ^M to nl translation. 46 `(let (selective-display ; Disable ^M to nl translation.
46 (file-coding-system 'no-conversion) 47 (coding-system-for-write 'no-conversion)
47 process-input-coding-system 48 process-input-coding-system
48 process-output-coding-system) 49 process-output-coding-system)
49 ,@body)) 50 ,@body))
50 51
51 (defmacro as-binary-input-file (&rest body) 52 (defmacro as-binary-input-file (&rest body)
52 `(let ((file-coding-system-for-read 'no-conversion)) 53 `(let ((coding-system-for-read 'no-conversion))
53 ,@body)) 54 ,@body))
54 55
55 (defmacro as-binary-output-file (&rest body) 56 (defmacro as-binary-output-file (&rest body)
56 `(let ((file-coding-system 'no-conversion)) 57 `(let ((coding-system-for-write 'no-conversion))
57 ,@body)) 58 ,@body))
58 59
59 60
60 ;;; @ binary access 61 ;;; @ binary access
61 ;;; 62 ;;;
65 "Like `insert-file-contents-literally', q.v., but don't code conversion. 66 "Like `insert-file-contents-literally', q.v., but don't code conversion.
66 A buffer may be modified in several ways after reading into the buffer due 67 A buffer may be modified in several ways after reading into the buffer due
67 to advanced Emacs features, such as file-name-handlers, format decoding, 68 to advanced Emacs features, such as file-name-handlers, format decoding,
68 find-file-hooks, etc. 69 find-file-hooks, etc.
69 This function ensures that none of these modifications will take place." 70 This function ensures that none of these modifications will take place."
70 (let ((file-coding-system-for-read 'no-conversion)) 71 (let ((coding-system-for-read 'no-conversion))
71 (insert-file-contents-literally filename visit beg end replace) 72 (insert-file-contents-literally filename visit beg end replace)
72 )) 73 ))
73 74
74 75
75 ;;; @ MIME charset 76 ;;; @ MIME charset