[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[mhc:00993] Re: mhc-cvs.el



>> On Mon, 21 Aug 2000 17:08:08 +0900
>> "nom" == nom@xxxxxxxxxxxxxxxxxxx (Yoshinari Nomura) said as follows:

nom> 個人的には、好きです。特に反対がないようなら、コミットしたいです。

個人的には、長い方が好きです。ですから、以下のように customizable にす
るのはどうでしょうか?

Index: mhc-file.el
===================================================================
RCS file: /cvsroot/mhc/emacs/mhc-file.el,v
retrieving revision 1.4
diff -u -u -r1.4 mhc-file.el
--- mhc-file.el	2000/08/04 07:40:52	1.4
+++ mhc-file.el	2000/08/21 09:05:02
@@ -120,11 +120,23 @@
 (defmacro mhc-file-remove (file)
   `(mhc-file/remove ,file mhc-file/offline))
 
+(defcustom mhc-file-line-status-strings
+  '(" mhc[offline]" . " mhc[ONLINE]")
+  "Strings to describe MHC network status."
+  :group 'mhc
+  :type '(choice
+	  (const :tag "Long format" (" mhc[offline]" . " mhc[ONLINE]"))
+	  (const :tag "Short format" (" Mhc" . " MHC"))
+	  (cons :tag "User definition"
+		(string :tag "String for offline")
+		(string :tag "String for online"))))
+
 (defun mhc-file-line-status ()
   "Return status string for mode line."
-  (format " mhc%s"
-	  (if mhc-show-network-status
-	      (if mhc-file/offline "[offline]" "[ONLINE]") "")))
+  (if mhc-show-network-status
+      (if mhc-file/offline
+	  (car mhc-file-line-status-strings)
+	(cdr mhc-file-line-status-strings))))
 
 (defun mhc-file-toggle-offline ()
   "*Toggle line status of file manipulation backend."
-- 
土屋 雅稔  ( TSUCHIYA Masatoshi )
    http://www-nagao.kuee.kyoto-u.ac.jp/member/tsuchiya/