X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=tl-header.el;h=fe37fecef76509c7ca169bb6713977de5514fcf6;hb=cd47eed235f4258380f6d9b401c2fb1fc884931c;hp=ef696dfe064289b151cc38ed21e0bfeec14e1685;hpb=7ea8c7377706103d8f9afc39e3f29e5454ef6404;p=elisp%2Ftm.git diff --git a/tl-header.el b/tl-header.el index ef696df..fe37fec 100644 --- a/tl-header.el +++ b/tl-header.el @@ -1,5 +1,5 @@ ;;; -;;; $Id: tl-header.el,v 4.6 1994/11/08 10:30:11 morioka Exp $ +;;; $Id: tl-header.el,v 5.2 1994/12/07 07:29:33 morioka Exp $ ;;; (provide 'tl-header) @@ -66,15 +66,46 @@ nil) )) +(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)) + ) + )))) + (defun message/parse-comment (str) (if (string-match "^\\s +" str) (setq str (substring str (match-end 0))) ) - (if (string-match "^([^,]*)" str) - (list (list "(" (substring str 1 (- (match-end 0) 1)) ")") - (substring str (match-end 0)) - ) - )) + (let ((ret (message::match-comment str))) + (if ret + (list (list "(" (substring (car ret) 1 (- (length (car ret)) 1)) + ")") + (nth 1 ret) + ) + ))) (defun message/parse-address (str) (let ((ret (or