[Mew-dist 15521] canna.el-20.7.patch

Ryota HIROSE hirose at example.com
2000年 12月 15日 (金) 13:58:50 JST


>From: Ryota HIROSE <hirose at example.com>
>Date: Thu, 14 Dec 2000 18:36:53 +0900

> CannaだとSubject:に直接日本語が打てないのが難ですが、まあ、なんとかな
> るでしょ。

emacs-dl-20.7付属のcanna.elにはcanna.el-19.34.patchが素直に当らなかっ
たので、パッチです。

ryt

-------------- next part --------------
*** canna.el.dist	Fri Nov 12 18:04:53 1999
--- canna.el	Fri Dec 15 13:41:44 2000
***************
*** 226,231 ****
--- 226,232 ----
  (defvar canna:*fence-mode* nil)
  ;(make-variable-buffer-local 'canna:*fence-mode*)
  ;(setq-default canna:*fence-mode* nil)
+ (defvar canna:*select-mode* nil)
  
  ;;;
  ;;; global variables
***************
*** 237,247 ****
  (defvar canna:*spos-undo-text* (make-marker))
  (defvar canna:*epos-undo-text* (make-marker))
  (defvar canna:*undo-text-yomi* nil)
- (defvar canna:*local-map-backup*  nil)
  (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*)
--- 238,246 ----
***************
*** 322,327 ****
--- 321,331 ----
         (define-key canna-mode-map [?\C- ]   [?\C-@])
         ))
  
+ (or (assq 'canna:*fence-mode* minor-mode-map-alist)
+     (setq minor-mode-map-alist
+           (cons (cons 'canna:*fence-mode* canna-mode-map)
+ 		minor-mode-map-alist)))
+ 
  ;; ミニバッファに何かを表示している時のローカルマップ
  (defvar canna-minibuffer-mode-map (make-sparse-keymap))
  
***************
*** 613,619 ****
  	 (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)
--- 617,623 ----
  	 (select-window (minibuffer-window))
  	 (set-window-buffer (minibuffer-window)
  			    (get-buffer-create canna:*menu-buffer*))
! 	 (setq canna:*select-mode* t)))
    )
  
  (defun canna:minibuffer-input (str len revpos revlen nfixed)
***************
*** 645,658 ****
  	  (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) )
--- 649,660 ----
  	  (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 canna:*select-mode* t)
  
  ;  (canna:yomi-attr-off (point-min) (point-max) )
  ;  (canna:henkan-attr-off (point-min) (point-max) )
***************
*** 679,685 ****
    (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*)
--- 681,687 ----
    (if (or (zerop len) canna-empty-info)
        (progn
  	(setq canna:*cursor-was-in-minibuffer* nil)
! 	(setq canna:*select-mode* nil)
  
  	;; ミニバッファウィンドウのバッファを元に戻す。
  	(set-window-buffer (minibuffer-window) canna:*saved-minibuffer*)
***************
*** 707,713 ****
    "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*)
    (let ((ch))
--- 709,715 ----
    "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 canna:*select-mode* nil)
    (set-window-buffer (minibuffer-window) canna:*saved-minibuffer*)
    (select-window canna:*previous-window*)
    (let ((ch))
***************
*** 843,856 ****
  				 canna:*saved-mode-string*
  			       new-mode)))
  			0)))
-   (setq canna:*local-map-backup* (current-local-map))
    (setq canna:*fence-mode* t)
    ;; XEmacs change:
    ;; (buffer-disable-undo (current-buffer))
    ;; Original:
    ;; (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)
--- 845,857 ----
  				 canna:*saved-mode-string*
  			       new-mode)))
  			0)))
    (setq canna:*fence-mode* t)
    ;; XEmacs change:
    ;; (buffer-disable-undo (current-buffer))
    ;; Original:
    ;; (if (boundp 'disable-undo)
    ;;     (setq disable-undo canna:*fence-mode*))
!   )
  
  (defun canna:enter-canna-mode-and-functional-insert ()
    (canna:enter-canna-mode)
***************
*** 859,865 ****
  
  (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
--- 860,865 ----


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