;; Author: Akira Kon <kon@d1.bs2.mt.nec.co.jp>
;; MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;; Version: $Revision: 1.7 $
+;; Version: $Revision: 1.8 $
;; Keywords: Canna, Japanese, input method, mule, multilingual
;; This file is not a part of Emacs yet.
;; end
(defconst canna-rcs-version
- "$Id: canna.el,v 1.7 1997-04-03 20:19:30 morioka Exp $")
+ "$Id: canna.el,v 1.8 1997-04-03 22:44:17 morioka Exp $")
(defun canna-version ()
"Display version of canna.el in mini-buffer."
(canna:memq-recursive a (cdr l)) )))
(defun canna:create-mode-line ()
- (if (not (canna:memq-recursive 'mode-line-canna-mode mode-line-format))
- (setq-default
- mode-line-format
- (append (list (list 'minibuffer-window-selected
- (list 'display-minibuffer-mode-in-minibuffer
- "-" "m") "-")
- (list 'minibuffer-window-selected
- (list 'display-minibuffer-mode-in-minibuffer
- 'mode-line-canna-mode
- 'mode-line-canna-mode-in-minibuffer)
- 'mode-line-canna-mode))
- mode-line-format)))
- (mode-line-canna-mode-update mode-line-canna-mode) )
+ "Add string of Canna status into mode-line."
+ (cond (running-xemacs
+ (or (canna:memq-recursive 'mode-line-canna-mode
+ default-modeline-format)
+ (setq-default default-modeline-format
+ (nconc '("" mode-line-canna-mode)
+ default-modeline-format))
+ )
+ (mapcar (function
+ (lambda (buffer)
+ (save-excursion
+ (set-buffer buffer)
+ (or (canna:memq-recursive 'mode-line-canna-mode
+ modeline-format)
+ (setq modeline-format
+ (nconc '("" mode-line-canna-mode)
+ modeline-format))
+ )
+ )))
+ (buffer-list))
+ )
+ (t
+ (or (canna:memq-recursive 'mode-line-canna-mode mode-line-format)
+ (setq-default
+ mode-line-format
+ (append (list (list 'minibuffer-window-selected
+ (list 'display-minibuffer-mode-in-minibuffer
+ "-" "m") "-")
+ (list 'minibuffer-window-selected
+ (list 'display-minibuffer-mode-in-minibuffer
+ 'mode-line-canna-mode
+ 'mode-line-canna-mode-in-minibuffer)
+ 'mode-line-canna-mode))
+ mode-line-format))
+ )))
+ (mode-line-canna-mode-update mode-line-canna-mode))
(defun canna:mode-line-display ()
(mode-line-canna-mode-update mode-line-canna-mode))