From: morioka Date: Thu, 3 Apr 1997 22:44:17 +0000 (+0000) Subject: (canna:create-mode-line): Modified for XEmacs. X-Git-Tag: emacs-canna-199811302358~29 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db5b06115dc4397ef1df95bca635fb6659435d9c;p=elisp%2Femacs-canna.git (canna:create-mode-line): Modified for XEmacs. --- diff --git a/canna.el b/canna.el index d6279ab..bf3ef96 100644 --- a/canna.el +++ b/canna.el @@ -5,7 +5,7 @@ ;; Author: Akira Kon ;; MORIOKA Tomohiko -;; Version: $Revision: 1.7 $ +;; Version: $Revision: 1.8 $ ;; Keywords: Canna, Japanese, input method, mule, multilingual ;; This file is not a part of Emacs yet. @@ -49,7 +49,7 @@ ;; 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." @@ -187,19 +187,42 @@ (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))