comparison leim/quail/japanese.el @ 88155:d7ddb3e565de

sync with trunk
author Henrik Enberg <henrik.enberg@telia.com>
date Mon, 16 Jan 2006 00:03:54 +0000
parents 23a1cea22d13
children
comparison
equal deleted inserted replaced
88154:8ce476d3ba36 88155:d7ddb3e565de
1 ;;; japanese.el --- Quail package for inputting Japanese -*-coding: iso-2022-7bit;-*- 1 ;;; japanese.el --- Quail package for inputting Japanese -*-coding: iso-2022-7bit;-*-
2 2
3 ;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN. 3 ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2005
4 ;; Licensed to the Free Software Foundation. 4 ;; National Institute of Advanced Industrial Science and Technology (AIST)
5 ;; Registration Number H14PRO021
5 6
6 ;; Keywords: multilingual, input method, Japanese 7 ;; Keywords: multilingual, input method, Japanese
7 8
8 ;; This file is part of GNU Emacs. 9 ;; This file is part of GNU Emacs.
9 10
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details. 19 ;; GNU General Public License for more details.
19 20
20 ;; 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
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the 22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, 23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
23 ;; Boston, MA 02111-1307, USA. 24 ;; Boston, MA 02110-1301, USA.
24 25
25 ;;; Commentary: 26 ;;; Commentary:
26 27
27 ;;; Code: 28 ;;; Code:
28 29
77 (defun quail-japanese-kanji-kkc () 78 (defun quail-japanese-kanji-kkc ()
78 (interactive) 79 (interactive)
79 (when (= (char-before (overlay-end quail-conv-overlay)) ?n) 80 (when (= (char-before (overlay-end quail-conv-overlay)) ?n)
80 ;; The last char is `n'. We had better convert it to `ん' 81 ;; The last char is `n'. We had better convert it to `ん'
81 ;; before kana-kanji conversion. 82 ;; before kana-kanji conversion.
82 (goto-char (overlay-end quail-conv-overlay)) 83 (goto-char (1- (overlay-end quail-conv-overlay)))
83 (delete-char -1) 84 (insert ?ん)
84 (insert ?ん)) 85 (delete-char 1))
85 (let* ((from (copy-marker (overlay-start quail-conv-overlay))) 86 (let* ((from (copy-marker (overlay-start quail-conv-overlay)))
86 (len (- (overlay-end quail-conv-overlay) from))) 87 (len (- (overlay-end quail-conv-overlay) from)))
87 (quail-delete-overlays) 88 (quail-delete-overlays)
88 (setq quail-current-str nil) 89 (setq quail-current-str nil)
89 (unwind-protect 90 (unwind-protect
541 (japanese-katakana trans)) 542 (japanese-katakana trans))
542 ((vectorp trans) 543 ((vectorp trans)
543 (vector (japanese-katakana (aref trans 0)))) 544 (vector (japanese-katakana (aref trans 0))))
544 (t trans))))) 545 (t trans)))))
545 546
547 ;;; arch-tag: 47e0bfd4-6ecc-4d01-89a8-d687c5e01ff7
546 ;;; japanese.el ends here 548 ;;; japanese.el ends here