egg-980402.
[elisp/egg.git] / egg-mlh.el
index a520acf..36ad108 100644 (file)
@@ -10,7 +10,7 @@
 ;; Maintainer: NIIBE Yutaka <gniibe@mri.co.jp>
 ;; Keywords: mule, multilingual, input method
 
-;; This file will be part of GNU Emacs (in future).
+;; This file is part of EGG.
 
 ;; EGG is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
@@ -33,6 +33,8 @@
 
 ;;; Code:
 
+(defvar mlh-default-backend "wnn")
+
 (defun mlh-space-bar-backward-henkan ()
   "If the character preceding point is / (slash),
 Do `mlh-backward-henkan'.  Then, invoke appropriate conversion, if needed.
@@ -41,7 +43,12 @@ Or else, execute command that space-bar invokes usually."
   (let ((henkan-begin nil)
         (inhibit-henkan t)
         (its-disable-special-action t))
-    (its-select-hiragana)    ;; force to Japanese
+    (if (null (assoc "Japanese" egg-conversion-backend-alist))
+       (progn
+          (setq egg-mode-preference nil)
+          (activate-input-method (concat "japanese-egg-" mlh-default-backend)))
+      ;; force to Japanese
+      (its-select-hiragana))
     (mlh-backward-henkan)
     (if henkan-begin
         (if (or inhibit-henkan (= henkan-begin (point)))