[Mew-dist 05205] Re: local-map

Kazu Yamamoto ( 山本和彦 ) kazu at example.com
1998年 6月 29日 (月) 21:14:14 JST


From: Mito <mit at example.com>
Subject: [Mew-dist 05204] Re: local-map
Date: Mon, 29 Jun 1998 18:04:17 +0900

> use-local-map している所で overriding-terminal-local-map 変
> 数も設定するととりあえずは日本語入力できましたが、こんなもん
> でいいのでしょうか?
> 詳しい方に添削していただきたいので、添付させていただきます。

あああ、overriding-terminal-local-map という技があったのですね。でもこ
れは、バッファローカルではないので、バッファローカルである
overriding-local-map の方がいいかと思います。また、use-local-map も不
要ですね。というわけでパッチです。

みなさん、試してください。

--かず


-------------- next part --------------
*** canna.el.orig	Mon Jun 29 04:45:35 1998
--- canna.el	Mon Jun 29 21:03:10 1998
***************
*** 171,177 ****
  (defvar canna:*last-kouho* 0)
  (defvar canna:*initialized* nil)
  (defvar canna:*previous-window* nil)
- (defvar canna:*minibuffer-local-map-backup* nil)
  (defvar canna:*cursor-was-in-minibuffer* nil)
  (defvar canna:*menu-buffer* " *menu*")
  (defvar canna:*saved-minibuffer*)
--- 171,176 ----
***************
*** 515,521 ****
  	 (select-window (minibuffer-window))
  	 (set-window-buffer (minibuffer-window)
  			    (get-buffer-create canna:*menu-buffer*))
! 	 (use-local-map canna-minibuffer-mode-map) ))
    )
  
  (defun canna:minibuffer-input (str len revpos revlen nfixed)
--- 514,521 ----
  	 (select-window (minibuffer-window))
  	 (set-window-buffer (minibuffer-window)
  			    (get-buffer-create canna:*menu-buffer*))
!          (setq overriding-local-map canna-minibuffer-mode-map)
!          ))
    )
  
  (defun canna:minibuffer-input (str len revpos revlen nfixed)
***************
*** 543,557 ****
  	(setq canna:*saved-redirection* (frame-focus (selected-frame)))
  	(redirect-frame-focus (selected-frame) 
  			      (window-frame (minibuffer-window)))
- 
- 	;; ミニバッファのキーマップを保存しておく。
- 	(setq canna:*minibuffer-local-map-backup* (current-local-map))
  	))
    (select-window (minibuffer-window))
    (set-window-buffer (minibuffer-window)
  		     (get-buffer-create canna:*menu-buffer*))
  
!   (use-local-map canna-minibuffer-mode-map)
  
  ;  (canna:yomi-attr-off (point-min) (point-max) )
  ;  (canna:henkan-attr-off (point-min) (point-max) )
--- 543,554 ----
  	(setq canna:*saved-redirection* (frame-focus (selected-frame)))
  	(redirect-frame-focus (selected-frame) 
  			      (window-frame (minibuffer-window)))
  	))
    (select-window (minibuffer-window))
    (set-window-buffer (minibuffer-window)
  		     (get-buffer-create canna:*menu-buffer*))
  
!   (setq overriding-local-map canna-minibuffer-mode-map)
  
  ;  (canna:yomi-attr-off (point-min) (point-max) )
  ;  (canna:henkan-attr-off (point-min) (point-max) )
***************
*** 578,584 ****
    (if (or (zerop len) canna-empty-info)
        (progn
  	(setq canna:*cursor-was-in-minibuffer* nil)
! 	(use-local-map canna:*minibuffer-local-map-backup*)
  
  	;; ミニバッファウィンドウのバッファを元に戻す。
  	(set-window-buffer (minibuffer-window) canna:*saved-minibuffer*)
--- 575,581 ----
    (if (or (zerop len) canna-empty-info)
        (progn
  	(setq canna:*cursor-was-in-minibuffer* nil)
!         (setq overriding-local-map nil)
  
  	;; ミニバッファウィンドウのバッファを元に戻す。
  	(set-window-buffer (minibuffer-window) canna:*saved-minibuffer*)
***************
*** 602,608 ****
    "Use input character as a key of complex translation input such as\n\
  kana-to-kanji translation, even if you are in the minibuffer."
    (interactive "p")
!   (use-local-map canna:*minibuffer-local-map-backup*)
    (set-window-buffer (minibuffer-window) canna:*saved-minibuffer*)
    (select-window canna:*previous-window*)
    (canna:functional-insert-command2 last-command-char arg) )
--- 599,605 ----
    "Use input character as a key of complex translation input such as\n\
  kana-to-kanji translation, even if you are in the minibuffer."
    (interactive "p")
!   (setq overriding-local-map nil)
    (set-window-buffer (minibuffer-window) canna:*saved-minibuffer*)
    (select-window canna:*previous-window*)
    (canna:functional-insert-command2 last-command-char arg) )
***************
*** 731,741 ****
  				 canna:*saved-mode-string*
  			       new-mode)))
  			0)))
-   (setq canna:*local-map-backup*  (current-local-map))
    (setq canna:*fence-mode* t)
    (if (boundp 'disable-undo)
        (setq disable-undo canna:*fence-mode*))
!   (use-local-map canna-mode-map) )
  
  (defun canna:enter-canna-mode-and-functional-insert ()
    (canna:enter-canna-mode)
--- 728,738 ----
  				 canna:*saved-mode-string*
  			       new-mode)))
  			0)))
    (setq canna:*fence-mode* t)
    (if (boundp 'disable-undo)
        (setq disable-undo canna:*fence-mode*))
!   (setq overriding-local-map canna-mode-map)
!   )
  
  (defun canna:enter-canna-mode-and-functional-insert ()
    (canna:enter-canna-mode)
***************
*** 744,750 ****
  
  (defun canna:quit-canna-mode ()
    (cond (canna:*fence-mode*
! 	 (use-local-map canna:*local-map-backup*)
  	 (setq canna:*fence-mode* nil)
  	 (if canna:*exit-japanese-mode*
  	     (progn
--- 741,747 ----
  
  (defun canna:quit-canna-mode ()
    (cond (canna:*fence-mode*
!          (setq overriding-local-map nil)
  	 (setq canna:*fence-mode* nil)
  	 (if canna:*exit-japanese-mode*
  	     (progn


Mew-dist メーリングリストの案内