comparison lisp/mule/japan-util.el @ 778:2923009caf47

[xemacs-hg @ 2002-03-16 10:38:59 by ben] cm.c, file-coding.c: fix warnings. .cvsignore: Those pesky *.tmp files. mule\arabic.el, mule\canna-leim.el, mule\china-util.el, mule\chinese.el, mule\cyril-util.el, mule\cyrillic.el, mule\devan-util.el, mule\devanagari.el, mule\english.el, mule\ethio-util.el, mule\ethiopic.el, mule\european.el, mule\greek.el, mule\hebrew.el, mule\indian.el, mule\japan-util.el, mule\japanese.el, mule\korea-util.el, mule\korean.el, mule\lao-util.el, mule\lao.el, mule\misc-lang.el, mule\mule-charset.el, mule\mule-cmds.el, mule\thai-util.el, mule\thai.el, mule\tibet-util.el, mule\tibetan.el, mule\viet-util.el, mule\vietnamese.el, unicode.el: Fix lots of warnings. Sync up some files to FSF 21.1. Copy over all charset definitions from FSF 21.1, convert them to our format, and stick them in the relevant files. Eventually we will actually be able to dump these files (though they may not quite work). autoload.el: Support defun*, defmacro*. mule/mule-composite.el, mule/mule-composite-stub.el: New file, stubs for nonexistent composition funs/vars. mule/viet-chars.el, dumped-lisp.el: Account for these changes. font.el, mouse.el, msw-font-menu.el, printer.el, startup.el: fix warnings.
author ben
date Sat, 16 Mar 2002 10:39:19 +0000
parents 79940b592197
children c10d0c3f965f
comparison
equal deleted inserted replaced
777:e65d9cf16707 778:2923009caf47
1 ;;; japan-util.el --- utilities for Japanese -*- coding: iso-2022-7bit; -*- 1 ;;; japan-util.el --- utilities for Japanese -*- coding: iso-2022-7bit; -*-
2 2
3 3
4 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 4 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
5 ;; Licensed to the Free Software Foundation. 5 ;; Licensed to the Free Software Foundation.
6 ;; Copyright (C) 2001 Free Software Foundation, Inc.
6 7
7 ;; Keywords: mule, multilingual, Japanese 8 ;; Keywords: mule, multilingual, Japanese
8 9
9 ;; This file is part of XEmacs. 10 ;; This file is part of XEmacs.
10 11
21 ;; You should have received a copy of the GNU General Public License 22 ;; You should have received a copy of the GNU General Public License
22 ;; along with XEmacs; see the file COPYING. If not, write to the Free 23 ;; along with XEmacs; see the file COPYING. If not, write to the Free
23 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 24 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
24 ;; 02111-1307, USA. 25 ;; 02111-1307, USA.
25 26
26 ;;; Synched up with: Emacs 21.0.103 (language/japan-util.el). 27 ;;; Synched up with: Emacs 21.1 (language/japan-util.el).
28
29 ;;; Commentary:
27 30
28 ;;; Code: 31 ;;; Code:
29 32
30 (defvar sentence-end-save nil) 33 (defvar sentence-end-save nil)
31 34
102 (put-char-code-property jisx0201 'jisx0208 katakana))))) 105 (put-char-code-property jisx0201 'jisx0208 katakana)))))
103 106
104 (defconst japanese-symbol-table 107 (defconst japanese-symbol-table
105 '((?\$B!!(B ?\ ) (?$B!$(B ?, ?(I$(B) (?$B!%(B ?. ?(I!(B) (?$B!"(B ?, ?(I$(B) (?$B!#(B ?. ?(I!(B) (?$B!&(B nil ?(I%(B) 108 '((?\$B!!(B ?\ ) (?$B!$(B ?, ?(I$(B) (?$B!%(B ?. ?(I!(B) (?$B!"(B ?, ?(I$(B) (?$B!#(B ?. ?(I!(B) (?$B!&(B nil ?(I%(B)
106 (?$B!'(B ?:) (?$B!((B ?\;) (?$B!)(B ??) (?$B!*(B ?!) (?$B!+(B nil ?(I^(B) (?$B!,(B nil ?(I_(B) 109 (?$B!'(B ?:) (?$B!((B ?\;) (?$B!)(B ??) (?$B!*(B ?!) (?$B!+(B nil ?(I^(B) (?$B!,(B nil ?(I_(B)
107 (?$B!-(B ?') (?$B!.(B ?`) (?$B!0(B ?^) (?$B!2(B ?_) (?$B!<(B ?-) (?$B!=(B ?-) (?$B!>(B ?-) 110 (?$B!-(B ?') (?$B!.(B ?`) (?$B!0(B ?^) (?$B!2(B ?_) (?$B!<(B ?- ?(I0(B) (?$B!=(B ?-) (?$B!>(B ?-)
108 (?$B!?(B ?/) (?$B!@(B ?\\) (?$B!A(B ?~) (?$B!C(B ?|) (?$B!F(B ?`) (?$B!G(B ?') (?$B!H(B ?\") (?$B!I(B ?\") 111 (?$B!?(B ?/) (?$B!@(B ?\\) (?$B!A(B ?~) (?$B!C(B ?|) (?$B!F(B ?`) (?$B!G(B ?') (?$B!H(B ?\") (?$B!I(B ?\")
109 (?\$B!J(B ?\() (?\$B!K(B ?\)) (?\$B!N(B ?[) (?\$B!O(B ?]) (?\$B!P(B ?{) (?\$B!Q(B ?}) 112 (?\$B!J(B ?\() (?\$B!K(B ?\)) (?\$B!N(B ?[) (?\$B!O(B ?]) (?\$B!P(B ?{) (?\$B!Q(B ?})
110 (?$B!R(B ?<) (?$B!S(B ?>) (?$B!\(B ?+) (?$B!](B ?-) (?$B!a(B ?=) (?$B!c(B ?<) (?$B!d(B ?>) 113 (?$B!R(B ?<) (?$B!S(B ?>) (?$B!\(B ?+) (?$B!](B ?-) (?$B!a(B ?=) (?$B!c(B ?<) (?$B!d(B ?>)
111 (?$B!l(B ?') (?$B!m(B ?\") (?$B!o(B ?\\) (?$B!p(B ?$) (?$B!s(B ?%) (?$B!t(B ?#) (?$B!u(B ?&) (?$B!v(B ?*) 114 (?$B!l(B ?') (?$B!m(B ?\") (?$B!o(B ?\\) (?$B!p(B ?$) (?$B!s(B ?%) (?$B!t(B ?#) (?$B!u(B ?&) (?$B!v(B ?*)
112 (?$B!w(B ?@)) 115 (?$B!w(B ?@))
200 The argument may be a character or string. The result has the same type. 203 The argument may be a character or string. The result has the same type.
201 The argument object is not altered--the value is a copy. 204 The argument object is not altered--the value is a copy.
202 Optional argument ASCII-ONLY non-nil means to return only ASCII character." 205 Optional argument ASCII-ONLY non-nil means to return only ASCII character."
203 (if (stringp obj) 206 (if (stringp obj)
204 (japanese-string-conversion obj 'japanese-hankaku-region ascii-only) 207 (japanese-string-conversion obj 'japanese-hankaku-region ascii-only)
205 (or (get-char-code-property obj 'ascii) 208 (or (and (not ascii-only)
206 (and (not ascii-only)
207 (get-char-code-property obj 'jisx0201)) 209 (get-char-code-property obj 'jisx0201))
210 (get-char-code-property obj 'ascii)
208 obj))) 211 obj)))
209 212
210 ;;;###autoload 213 ;;;###autoload
211 (defun japanese-zenkaku (obj) 214 (defun japanese-zenkaku (obj)
212 "Convert argument to `zenkaku' and return that. 215 "Convert argument to `zenkaku' and return that.
281 (narrow-to-region from to) 284 (narrow-to-region from to)
282 (save-excursion 285 (save-excursion
283 (goto-char (point-min)) 286 (goto-char (point-min))
284 (while (re-search-forward "\\cj" nil t) 287 (while (re-search-forward "\\cj" nil t)
285 (let* ((zenkaku (preceding-char)) 288 (let* ((zenkaku (preceding-char))
286 (hankaku (or (get-char-code-property zenkaku 'ascii) 289 (hankaku (or (and (not ascii-only)
287 (and (not ascii-only) 290 (get-char-code-property zenkaku 'jisx0201))
288 (get-char-code-property zenkaku 'jisx0201))))) 291 (get-char-code-property zenkaku 'ascii))))
289 (if hankaku 292 (if hankaku
290 (japanese-replace-region (match-beginning 0) (match-end 0) 293 (japanese-replace-region (match-beginning 0) (match-end 0)
291 hankaku))))))) 294 hankaku)))))))
292 295
293 ;;;###autoload 296 ;;;###autoload