Mercurial > hg > xemacs-beta
comparison lisp/tl/emu-e19.el @ 10:49a24b4fd526 r19-15b6
Import from CVS: tag r19-15b6
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:47:52 +0200 |
parents | b82b59fe008d |
children | 0293115a14e9 |
comparison
equal
deleted
inserted
replaced
9:6f2bbbbbe05a | 10:49a24b4fd526 |
---|---|
1 ;;; emu-e19.el --- emu module for Emacs 19 and XEmacs 19 | 1 ;;; emu-e19.el --- emu module for Emacs 19 and XEmacs 19 |
2 | 2 |
3 ;; Copyright (C) 1995,1996 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1995,1996 Free Software Foundation, Inc. |
4 | 4 |
5 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> | 5 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp> |
6 ;; Version: $Id: emu-e19.el,v 1.1.1.1 1996/12/18 03:55:31 steve Exp $ | 6 ;; Version: $Id: emu-e19.el,v 1.2 1996/12/29 00:15:08 steve Exp $ |
7 ;; Keywords: emulation, compatibility, mule, Latin-1 | 7 ;; Keywords: emulation, compatibility, mule, Latin-1 |
8 | 8 |
9 ;; This file is part of tl (Tiny Library). | 9 ;; This file is part of emu. |
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 |
12 ;; modify it under the terms of the GNU General Public License as | 12 ;; modify it under the terms of the GNU General Public License as |
13 ;; published by the Free Software Foundation; either version 2, or (at | 13 ;; published by the Free Software Foundation; either version 2, or (at |
14 ;; your option) any later version. | 14 ;; your option) any later version. |
37 | 37 |
38 ;;; @ character set | 38 ;;; @ character set |
39 ;;; | 39 ;;; |
40 | 40 |
41 (defconst charset-ascii 0 "Character set of ASCII") | 41 (defconst charset-ascii 0 "Character set of ASCII") |
42 (defconst charset-latin-1 129 "Character set of ISO-8859-1") | 42 (defconst charset-latin-iso8859-1 129 "Character set of ISO-8859-1") |
43 | 43 |
44 (defun charset-description (charset) | 44 (defun charset-description (charset) |
45 "Return description of CHARSET. [emu-e19.el]" | 45 "Return description of CHARSET. [emu-e19.el]" |
46 (if (< charset 128) | 46 (if (< charset 128) |
47 (documentation-property 'charset-ascii 'variable-documentation) | 47 (documentation-property 'charset-ascii 'variable-documentation) |
48 (documentation-property 'charset-latin-1 'variable-documentation) | 48 (documentation-property 'charset-latin-iso8859-1 'variable-documentation) |
49 )) | 49 )) |
50 | 50 |
51 (defun charset-registry (charset) | 51 (defun charset-registry (charset) |
52 "Return registry name of CHARSET. [emu-e19.el]" | 52 "Return registry name of CHARSET. [emu-e19.el]" |
53 (if (< charset 128) | 53 (if (< charset 128) |
66 | 66 |
67 (defun find-charset-string (str) | 67 (defun find-charset-string (str) |
68 "Return a list of charsets in the string. | 68 "Return a list of charsets in the string. |
69 \[emu-e19.el; Mule emulating function]" | 69 \[emu-e19.el; Mule emulating function]" |
70 (if (string-match "[\200-\377]" str) | 70 (if (string-match "[\200-\377]" str) |
71 (list lc-ltn1) | 71 (list charset-latin-iso8859-1) |
72 )) | 72 )) |
73 | 73 |
74 (defalias 'find-non-ascii-charset-string 'find-charset-string) | 74 (defalias 'find-non-ascii-charset-string 'find-charset-string) |
75 | 75 |
76 (defun find-charset-region (start end) | 76 (defun find-charset-region (start end) |
80 (save-restriction | 80 (save-restriction |
81 (narrow-to-region start end) | 81 (narrow-to-region start end) |
82 (goto-char start) | 82 (goto-char start) |
83 (re-search-forward "[\200-\377]" nil t) | 83 (re-search-forward "[\200-\377]" nil t) |
84 )) | 84 )) |
85 (list lc-ltn1) | 85 (list charset-latin-iso8859-1) |
86 )) | 86 )) |
87 | 87 |
88 (defalias 'find-non-ascii-charset-region 'find-charset-region) | 88 (defalias 'find-non-ascii-charset-region 'find-charset-region) |
89 | |
90 ;;; @@ for old MULE emulation | |
91 ;;; | |
92 | |
93 (defconst lc-ascii 0) | |
94 (defconst lc-ltn1 129) | |
95 | 89 |
96 | 90 |
97 ;;; @ coding-system | 91 ;;; @ coding-system |
98 ;;; | 92 ;;; |
99 | 93 |
211 (defun char-charset (chr) | 205 (defun char-charset (chr) |
212 "Return the character set of char CHR. | 206 "Return the character set of char CHR. |
213 \[emu-e19.el; XEmacs 20 emulating function]" | 207 \[emu-e19.el; XEmacs 20 emulating function]" |
214 (if (< chr 128) | 208 (if (< chr 128) |
215 charset-ascii | 209 charset-ascii |
216 charset-latin-1)) | 210 charset-latin-iso8859-1)) |
217 | 211 |
218 (defun char-bytes (char) | 212 (defun char-bytes (char) |
219 "Return number of bytes a character in CHAR occupies in a buffer. | 213 "Return number of bytes a character in CHAR occupies in a buffer. |
220 \[emu-e19.el; MULE emulating function]" | 214 \[emu-e19.el; MULE emulating function]" |
221 1) | 215 1) |