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

Re: sb-asahi.el updated



>> On Tue, 03 Jun 2003 13:32:23 +0900
>> 「山」== yamaoka@jpl.org (Katsumi Yamaoka) said as follows:

山> むむ、sb-text.el は autoload じゃマズいかもしれん。

あのお,どうして sb-asahi が sb-text を継承する,という解ではいけない
のでしょうか? 動作確認をしていない書き殴りなんですが,末尾のような感じ
では駄目ですか?

-- 
土屋 雅稔 ( TSUCHIYA Masatoshi )

;; sb-asahi.el
(luna-define-class shimbun-asahi (shimbun-text) ())

(defun shimbun-asahi-adjust-date-header (shimbun header)
  (when (and (member (shimbun-current-group-internal entity)
		     '("science"))
	     (string-match " \\(00:00\\) "
			   (setq date (shimbun-header-date header))))
    (setq start (match-beginning 1))
    (goto-char (point-max))
    (forward-line -1)
    (when (re-search-forward
	   "([01][0-9]/[0-3][0-9] \\([012][0-9]:[0-5][0-9]\\))"
	   nil t)
      (shimbun-header-set-date header
			       (concat (substring date 0 start)
				       (match-string 1)
				       (substring date (+ start 5)))))))

(luna-define-method shimbun-make-contents :before ((shimbun shimbun-asahi)
						   header)
  (shimbun-asahi-adjust-date-header shimbun header))

;; sb-asahi-html.el
(luna-define-class shimbun-asahi-html (shimbun-asahi) ())

(luna-define-method shimbun-make-contents ((shimbun shimbun-asahi)
					   header)
  (shimbun-asahi-adjust-date-header shimbun header)
  (shimbun-make-mime-article shimbun header))