comparison lisp/egg/egg-jisx0201.el @ 114:8619ce7e4c50 r20-1b9

Import from CVS: tag r20-1b9
author cvs
date Mon, 13 Aug 2007 09:21:54 +0200
parents 131b0175ea99
children 6c0ae1f9357f
comparison
equal deleted inserted replaced
113:2ec2fe4a4c89 114:8619ce7e4c50
20 20
21 ;;; 92.9.24 created for Mule Ver.0.9.6 by K.Shibata <shibata@sgi.co.jp> 21 ;;; 92.9.24 created for Mule Ver.0.9.6 by K.Shibata <shibata@sgi.co.jp>
22 ;;; 93.8.3 modified for Mule Ver.1.1 by K.Handa <handa@etl.go.jp> 22 ;;; 93.8.3 modified for Mule Ver.1.1 by K.Handa <handa@etl.go.jp>
23 ;;; Not to define regexp of Japanese word in this file. 23 ;;; Not to define regexp of Japanese word in this file.
24 24
25 (provide 'jisx0201) 25 (require 'egg)
26 (provide 'egg-jisx0201)
26 27
27 (defvar *katakana-alist* 28 (defvar *katakana-alist*
28 '(( 161 . "(I'(B" ) 29 '(( 161 . "(I'(B" )
29 ( 162 . "(I1(B" ) 30 ( 162 . "(I1(B" )
30 ( 163 . "(I((B" ) 31 ( 163 . "(I((B" )
140 (narrow-to-region start end) 141 (narrow-to-region start end)
141 (goto-char (point-min)) 142 (goto-char (point-min))
142 (let ((regexp (if arg "\\cS\\|\\cK\\|\\cH" "\\cS\\|\\cK"))) 143 (let ((regexp (if arg "\\cS\\|\\cK\\|\\cH" "\\cS\\|\\cK")))
143 (while (re-search-forward regexp (point-max) (point-max)) 144 (while (re-search-forward regexp (point-max) (point-max))
144 (let* ((ch (preceding-char)) 145 (let* ((ch (preceding-char))
145 (ch1 (char-component ch 1)) 146 (ch1 (char-octet ch 0))
146 (ch2 (char-component ch 2))) 147 (ch2 (char-octet ch 1)))
147 (cond ((= ?\241 ch1) 148 (cond ((= ?\241 ch1)
148 (let ((val (cdr (assq ch2 *katakana-kigou-alist*)))) 149 (let ((val (cdr (assq ch2 *katakana-kigou-alist*))))
149 (if val (progn 150 (if val (progn
150 (delete-char -1) 151 (delete-char -1)
151 (insert val))))) 152 (insert val)))))