;;; -*-Emacs-Lisp-*- ;;; ;;; glog_mem.el: Memo mode functions for GLOG. ;;; ;;; Dec.29,'95. neco. ;;; Jan.03,'96. neco. Change counting article number to by lines. ;;; ;;; $Log:$ ;;; (defconst glog_memo "$Header: glog_mem.elv 0.1 95/12/29 18:00:00 neco Exp $") (require 'glog) (defun view-memo-mode (&optional view-return-to-buffer) ;; Major mode for viewing memo. (fset 'glog-get-forum-name (function glog-undefined-function)) (fset 'glog-get-board-name (function glog-undefined-function)) (fset 'glog-get-article-info (function glog-get-article-info-memo)) (fset 'glog-get-mail-info (function glog-undefined-function)) (fset 'glog-set-post-header (function glog-undefined-function)) (fset 'glog-set-post-terminator (function glog-undefined-function)) (fset 'glog-set-mail-header (function glog-undefined-function)) (fset 'glog-set-mail-terminator (function glog-undefined-function)) (fset 'glog-check-post (function glog-undefined-function)) (setq glog-match-string-forum nil) (setq glog-match-string-board nil) (setq glog-match-string-article "^---[- \t]*$") (setq glog-match-string-mail nil) (setq glog-match-string-skip nil) (setq glog-match-string-article-end (concat "\\(" glog-match-string-article "\\)")) (setq glog-search-regexp (concat "\\(" glog-match-string-article "\\)")) (run-hooks 'view-memo-mode-hook)) (defun glog-memo-version () glog_memo) (defun glog-get-article-info-memo () (let ((date "????-??-?? ??:??:??")(author "")(title "*無題*") (pos)(lines)(hlines)(art-no -1)(com-no)(linebuf)(limit)(p2)(foo)(bar)(ck nil)) (beginning-of-line) (setq pos (point)) (setq art-no (count-lines 1 pos)) (forward-line) (setq linebuf (glog-get-current-line)) (if (string-match (concat "^\\[\\([0-9]+/[0-9]+/[0-9]+\\)" "\\( [0-9]+:[0-9]+\\)?\\]" "[ \t]*$") linebuf) (progn (setq author (substring linebuf (match-beginning 1)(match-end 1))) (forward-line) (setq linebuf (glog-get-current-line))) (setq author "----/--/--")) (while (and (string-match "^[ \t]*$" linebuf) (not (eobp))) (forward-line) (message "空行:%s(%d)" linebuf (point)) (setq linebuf (glog-get-current-line))) (setq hlines (count-lines pos (point))) (setq title linebuf) (setq limit (glog-get-forward-line-position 300)) ; get search end pos (re-search-forward glog-match-string-article-end limit 1) (beginning-of-line) (setq lines (count-lines pos (point))) (if (> lines 1) ;; リストに纏める ;; (番号 unread title 発言id ハンドル 発言日 コメント先 位置 行数 ;; ヘッダ行数 種別) (list art-no ? title author author date com-no pos lines hlines 'board) nil))) (provide 'glog_memo) ;;; glog_mem.el ends here