;;; yude-egg.el --- Boiled-Egg like roman to kanaji converter ;; Copyright (C) 1996 MORIOKA Tomohiko ;; Author: MORIOKA Tomohiko ;; Version: $Id: yude-egg.el,v 0.5 1996/11/12 09:04:30 morioka Exp $ ;; Keywords: input, Japanese, mule ;; This file is not part of GNU Emacs. ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as ;; published by the Free Software Foundation; either version 2, or (at ;; your option) any later version. ;; This program is distributed in the hope that it will be useful, but ;; WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. ;;; Code: (require 'nabe) (require 'egg) (defun yude-egg-its-region (start end) (interactive "r") (let ((string (buffer-substring start end)) egg-mode) (delete-region start end) (egg-mode) (unless (string= string "") (let ((last-command-char (aref string 0))) (egg-self-insert-char) ) (let ((i 1) (len (length string)) ) (while (< i len) (let ((last-command-char (aref string i))) (its-self-insert-char) ) (setq i (1+ i)) ))) (its-exit-mode) )) (defun yude-egg-translate-region (start end) (interactive "r") (save-restriction (narrow-to-region start end) (yude-egg-its-region start end) (egg-convert-region (point-min)(point-max)) )) (setq nabe-roman-to-kanji-function 'yude-egg-translate-region) (setq nabe-roman-to-kana-function 'yude-egg-its-region) ;;; @ end ;;; (provide 'yude-egg) ;;; yude-egg.el ends here