+(defun message::match-ctexts (str)
+ (if (string-match "^[^()\\\\]+" str)
+ (let ((e (match-end 0)))
+ (list (substring str 0 e)(substring str e))
+ )))
+
+(defun message::match-comment (str)
+ (catch 'tag
+ (if (and (>= (length str) 2)
+ (= (elt str 0) ?\()
+ )
+ (let ((dest "") ret)
+ (setq str (substring str 1))
+ (while (cond ((string= str "")
+ (throw 'tag nil)
+ )
+ ((not (= (elt str 0) ?\)))
+ (setq ret (or (message::match-ctexts str)
+ (message::match-comment str)
+ ))
+ ))
+ (setq dest (concat dest (car ret)))
+ (setq str (nth 1 ret))
+ )
+ (if (= (elt str 0) ?\))
+ (list (concat "(" dest ")") (substring str 1))
+ )
+ ))))
+