Skip to content

Commit

Permalink
* navi2ch.el: Update copyright years.
Browse files Browse the repository at this point in the history
(navi2ch-info-cache, navi2ch-info-cache-limit): New variable.
(navi2ch-save-info, navi2ch-load-info): Use it.

* navi2ch-futaba.el: Update copyright years.

* navi2ch-history.el: Ditto.

* navi2ch-search.el: Ditto.

* navi2ch-articles.el: Ditto.

* navi2ch-localfile.el: Ditto.

* navi2ch-jbbs-shitaraba.el: Ditto.

* navi2ch-megabbs.el: Ditto.

* navi2ch-http-date.el: Ditto.

* navi2ch-directory.el: Ditto.

* navi2ch-face.el: Ditto.

* navi2ch-oyster.el: Ditto.

* navi2ch-message.el: Ditto.

* navi2ch-popup-article.el: Ditto.

* navi2ch-list.el: Ditto.

* navi2ch-jbbs-net.el: Ditto.

* navi2ch-vars.el: Ditto.

* navi2ch-article.el: Update copyright years.
(navi2ch-article-forward-buffer): Do not save-excursion(), use
with-current-buffer().
(navi2ch-article-get-message-filter-cache-file-name): Make inline.
(navi2ch-article-expunge-buffers): Use mapcar to check if buffer is sticky.
Reduced navi2ch-article-buffer-list() call time.
(navi2ch-article-load-article-summary)
(navi2ch-article-save-article-summary)
(navi2ch-article-get-message, navi2ch-article-get-current-name)
(navi2ch-article-get-current-mail)
(navi2ch-article-inside-range-p)
(navi2ch-article-get-buffer-name, navi2ch-article-check-cached):
Make inline.
(navi2ch-article-kill-buffer-hook): Don't change its state cache
if its state was update.
(navi2ch-article-load-info,navi2ch-article-save-info):
Abolish navi2ch-article-info-cache.

* navi2ch-util.el: Copyright ¤Îɽµ­¤ò¹¹¿·¡£
(navi2ch-filename-to-url, navi2ch-rename-file)
(navi2ch-read-only-string, navi2ch-count-lines-file)
(navi2ch-put-alist): Make inline.
(navi2ch-float-time): If defined, use built-in version of float-time().

* navi2ch-multibbs.el: Update copyright years.
(navi2ch-multibbs-board-update)
(navi2ch-multibbs-board-get-file-name)
(navi2ch-2ch-subject-callback, navi2ch-multibbs-get-func)
(navi2ch-multibbs-get-bbstype): Make inline.

* navi2ch-net.el: Update copyright years.
(navi2ch-net-add-state, navi2ch-net-get-state): Make inline.

* navi2ch-board.el: Update copyright years.
(navi2ch-board-set-property)
(navi2ch-board-get-property, navi2ch-board-get-board)
(navi2ch-board-exit, navi2ch-board-get-uri)
(navi2ch-board-get-matched-article): Make inline.
(navi2ch-board-get-article): Make alias.

* navi2ch-bookmark.el: Update copyright years.
(navi2ch-bookmark-get-property)
(navi2ch-bookmark-get-article, navi2ch-bookmark-get-board)
(navi2ch-bookmark-exit): Make inline.

* navi2ch-board-misc.el: Update copyright years.
(navi2ch-bm-goto-updated-mark-column)
(navi2ch-bm-goto-state-column, navi2ch-bm-goto-mark-column)
(navi2ch-bm-get-state,navi2ch-bm-get-updated-mark): Make inline.
  • Loading branch information
nawota committed Jan 31, 2008
1 parent cdebe90 commit 4fa2691
Show file tree
Hide file tree
Showing 32 changed files with 286 additions and 175 deletions.
97 changes: 93 additions & 4 deletions ChangeLog
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,92 @@
2008-02-01 Naohiro Aota <nao.aota@gmail.com>

* navi2ch.el: Copyright $B$NI=5-$r99?7!#(B
(navi2ch-info-cache, navi2ch-info-cache-limit): $B?7JQ?t!#(B
(navi2ch-save-info, navi2ch-load-info): Use it.

* navi2ch-futaba.el: Copyright $B$NI=5-$r99?7!#(B

* navi2ch-history.el: Ditto.

* navi2ch-search.el: Ditto.

* navi2ch-articles.el: Ditto.

* navi2ch-localfile.el: Ditto.

* navi2ch-jbbs-shitaraba.el: Ditto.

* navi2ch-megabbs.el: Ditto.

* navi2ch-http-date.el: Ditto.

* navi2ch-directory.el: Ditto.

* navi2ch-face.el: Ditto.

* navi2ch-oyster.el: Ditto.

* navi2ch-message.el: Ditto.

* navi2ch-popup-article.el: Ditto.

* navi2ch-list.el: Ditto.

* navi2ch-jbbs-net.el: Ditto.

* navi2ch-vars.el: Ditto.

* navi2ch-article.el: Copyright $B$NI=5-$r99?7!#(B
(navi2ch-article-forward-buffer): save-excursion $B$G$O$J$/!"(B
with-current-buffer $B$r;H$&!#(B
(navi2ch-article-get-message-filter-cache-file-name): inline $B$K!#(B
(navi2ch-article-expunge-buffers): sticky $B$+$I$&$+$r(B mapcar $B$G=hM}(B
$B$9$k$h$&$K!#(B navi2ch-article-buffer-list() $B$N8F=P$72s?t$r8:$i$7$?!#(B
(navi2ch-article-load-article-summary)
(navi2ch-article-save-article-summary)
(navi2ch-article-get-message, navi2ch-article-get-current-name)
(navi2ch-article-get-current-mail)
(navi2ch-article-inside-range-p)
(navi2ch-article-get-buffer-name, navi2ch-article-check-cached):
inline $B$K!#(B
(navi2ch-article-kill-buffer-hook): updated $B$@$C$?%9%l$O(B state $B$r(B
cache $B$KJQ99$7$J$$!#(B
(navi2ch-article-load-info,navi2ch-article-save-info):
navi2ch-article-info-cache $B$rGQ;_!#(B

* navi2ch-util.el: Copyright $B$NI=5-$r99?7!#(B
(navi2ch-filename-to-url, navi2ch-rename-file)
(navi2ch-read-only-string, navi2ch-count-lines-file)
(navi2ch-put-alist): inline $B$K!#(B
(navi2ch-float-time): $BDj5A$5$l$F$$$l$P!"(B built-in $B$N(B float-time $B$r(B
$B;HMQ$9$k$h$&$K!#(B

* navi2ch-multibbs.el: Copyright $B$NI=5-$r99?7!#(B
(navi2ch-multibbs-board-update)
(navi2ch-multibbs-board-get-file-name)
(navi2ch-2ch-subject-callback, navi2ch-multibbs-get-func)
(navi2ch-multibbs-get-bbstype): inline $B$K!#(B

* navi2ch-net.el: Copyright $B$NI=5-$r99?7!#(B
(navi2ch-net-add-state, navi2ch-net-get-state): inline $B$K!#(B

* navi2ch-board.el: Copyright $B$NI=5-$r99?7!#(B
(navi2ch-board-set-property)
(navi2ch-board-get-property, navi2ch-board-get-board)
(navi2ch-board-exit, navi2ch-board-get-uri)
(navi2ch-board-get-matched-article): inline $B$K!#(B
(navi2ch-board-get-article): alias $B$K!#(B

* navi2ch-bookmark.el: Copyright $B$NI=5-$r99?7!#(B
(navi2ch-bookmark-get-property)
(navi2ch-bookmark-get-article, navi2ch-bookmark-get-board)
(navi2ch-bookmark-exit): inline $B$K!#(B

* navi2ch-board-misc.el: Copyright $B$NI=5-$r99?7!#(B
(navi2ch-bm-goto-updated-mark-column)
(navi2ch-bm-goto-state-column, navi2ch-bm-goto-mark-column)
(navi2ch-bm-get-state,navi2ch-bm-get-updated-mark): inline $B$K!#(B

2008-01-30 Naohiro Aota <nao.aota@gmail.com> 2008-01-30 Naohiro Aota <nao.aota@gmail.com>


* navi2ch-vars.el (navi2ch-global-map): C-c C-l $B$K(B * navi2ch-vars.el (navi2ch-global-map): C-c C-l $B$K(B
Expand Down Expand Up @@ -921,7 +1010,7 @@


2006-06-10 NOKUBI Takatsugu <knok@daionet.gr.jp> 2006-06-10 NOKUBI Takatsugu <knok@daionet.gr.jp>


* $B%/%l%8%C%HF~$lK:$l$N$?$a:o=|0MMj$KBP1~(B $B%/%l%8%C%HF~$lK:$l$N$?$a:o=|0MMj$KBP1~(B


2006-05-29 NOKUBI Takatsugu <knok@daionet.gr.jp> 2006-05-29 NOKUBI Takatsugu <knok@daionet.gr.jp>


Expand Down Expand Up @@ -1519,7 +1608,7 @@


2004-05-29 miz <miz@users.sourceforge.net> 2004-05-29 miz <miz@users.sourceforge.net>


* navi2ch-oyster.el $B!|%5!<%P0\E>BP1~(B * navi2ch-oyster.el: $B!|%5!<%P0\E>BP1~(B


2004-05-09 Nanashi San <nanashi@users.sourceforge.net> 2004-05-09 Nanashi San <nanashi@users.sourceforge.net>


Expand Down Expand Up @@ -1847,7 +1936,7 @@


* navi2ch-vars.el (navi2ch-global-view-map): * navi2ch-vars.el (navi2ch-global-view-map):
[del] [delete] [backspace] $B$G(B "\d" $B$,F~NO$5$l$k$h$&$K!#(B [del] [delete] [backspace] $B$G(B "\d" $B$,F~NO$5$l$k$h$&$K!#(B
* ($B>e5-$N;R(B map): scrolldown $B7O$N%P%$%s%I$O(B "\d" $B$N$_$K!#(B ($B>e5-$N;R(B map): scrolldown $B7O$N%P%$%s%I$O(B "\d" $B$N$_$K!#(B


* navi2ch-board-misc.el (navi2ch-bm-get-state-from-article): $B?74X?t!#(B * navi2ch-board-misc.el (navi2ch-bm-get-state-from-article): $B?74X?t!#(B
(navi2ch-bm-insert-subject): $B>e5-4X?t$r;HMQ!#(B (navi2ch-bm-insert-subject): $B>e5-4X?t$r;HMQ!#(B
Expand Down Expand Up @@ -2019,7 +2108,7 @@


* navi2ch.el: eval-last-sexp, shell-command $B$K(B advice $BDI2C!#(B * navi2ch.el: eval-last-sexp, shell-command $B$K(B advice $BDI2C!#(B
$B%;%-%e%j%F%#BP:v!#(B $B%;%-%e%j%F%#BP:v!#(B
* $B>e5-(B commit $B$r<h>C$7!#(B $B>e5-(B commit $B$r<h>C$7!#(B


2004-03-12 Nanashi San <nanashi@users.sourceforge.net> 2004-03-12 Nanashi San <nanashi@users.sourceforge.net>


Expand Down
7 changes: 4 additions & 3 deletions ChangeLog.1
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -475,10 +475,9 @@
(navi2ch-bm-mark): $B0z?t(B ARG $B$r<h$k$h$&$K!#>e$KDI?o(B (navi2ch-bm-mark): $B0z?t(B ARG $B$r<h$k$h$&$K!#>e$KDI?o(B
(navi2ch-bm-unmark): $BF1>e(B (navi2ch-bm-unmark): $BF1>e(B


* (navi2ch-board-window-height): navi2ch-vars.el $B$GDj5A$7$F$$$?$N(B * navi2ch-vars.el (navi2ch-board-window-height): navi2ch-vars.el $B$G(B
$B$G:o=|(B $BDj5A$7$F$$$?$N$G:o=|(B
(navi2ch-bm-subject-width): $BF1>e(B (navi2ch-bm-subject-width): $BF1>e(B
(navi2ch-net-update-file-diff): navi2ch-net-file-start $B$r;H$o$J$/$7$?(B


* navi2ch-article.el (navi2ch-article-through-next): * navi2ch-article.el (navi2ch-article-through-next):
navi2ch-bm-next-line $B$r;H$&$h$&$K(B navi2ch-bm-next-line $B$r;H$&$h$&$K(B
Expand All @@ -489,6 +488,8 @@
(navi2ch-net-setting-file-name): $BF1>e(B (navi2ch-net-setting-file-name): $BF1>e(B
(navi2ch-net-download-file): User-Agent $B$r=P$9$h$&$K(B (navi2ch-net-download-file): User-Agent $B$r=P$9$h$&$K(B
(navi2ch-net-download-logo): SETTING.TXT $B$+$iFI$`$h$&$K(B (navi2ch-net-download-logo): SETTING.TXT $B$+$iFI$`$h$&$K(B
(navi2ch-net-update-file-diff): navi2ch-net-file-start $B$r;H$o$J$/$7(B
$B$?(B


2001-09-18 129 $B$NL>L5$7$5$s(B <129@unix.2ch.net> 2001-09-18 129 $B$NL>L5$7$5$s(B <129@unix.2ch.net>


Expand Down
11 changes: 7 additions & 4 deletions ChangeLog.2
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2281,7 +2281,7 @@


2002-09-02 mizmiz <mizmiz@users.sourceforge.net> 2002-09-02 mizmiz <mizmiz@users.sourceforge.net>


* navi2ch-oyster.el $B%*%$%9%?!<:n@oBP1~%=!<%9?75,DI2C(B * navi2ch-oyster.el: $B%*%$%9%?!<:n@oBP1~%=!<%9?75,DI2C(B


* navi2ch.el (require 'navi2ch-oyster)$BDI2C(B * navi2ch.el (require 'navi2ch-oyster)$BDI2C(B


Expand Down Expand Up @@ -3981,7 +3981,7 @@


2002-06-12 mami <mami@users.sourceforge.net> 2002-06-12 mami <mami@users.sourceforge.net>


* $B!V(Bnanashi $B$5$s$*$+$($j!3(B($B!-"&!.(B)$B%N!W%j%j!<%9!#(B $B!V(Bnanashi $B$5$s$*$+$($j!3(B($B!-"&!.(B)$B%N!W%j%j!<%9!#(B


* navi2ch-board-misc.el (navi2ch-bm-sort-by-date): $B?74X?t!#(B * navi2ch-board-misc.el (navi2ch-bm-sort-by-date): $B?74X?t!#(B
(navi2ch-bm-sort): navi2ch-bm-sort-by-date $B$r;H$&$h$&$K!#(B (navi2ch-bm-sort): navi2ch-bm-sort-by-date $B$r;H$&$h$&$K!#(B
Expand All @@ -3991,16 +3991,19 @@
* navi2ch-articles.el * navi2ch-articles.el
(navi2ch-articles-delete-mark-aritcle): $B?74X?t!#(B (navi2ch-articles-delete-mark-aritcle): $B?74X?t!#(B
(navi2ch-articles-mode-map): $B>e5-4X?t$r(B "md" $B$K%P%$%s%I!#(B (navi2ch-articles-mode-map): $B>e5-4X?t$r(B "md" $B$K%P%$%s%I!#(B

* navi2ch-board.el * navi2ch-board.el
(navi2ch-board-hide-mark-article): $B?74X?t!#(B (navi2ch-board-hide-mark-article): $B?74X?t!#(B
(navi2ch-board-mode-map): $B>e5-4X?t$r(B "md" $B$K%P%$%s%I!#(B (navi2ch-board-mode-map): $B>e5-4X?t$r(B "md" $B$K%P%$%s%I!#(B
(navi2ch-board-delete-bookmark-mark-article): $B?74X?t!#(B (navi2ch-board-delete-bookmark-mark-article): $B?74X?t!#(B
(navi2ch-board-bookmark-mode-map): $B>e5-4X?t$r(B "md" $B$K%P%$%s%I!#(B (navi2ch-board-bookmark-mode-map): $B>e5-4X?t$r(B "md" $B$K%P%$%s%I!#(B
(navi2ch-board-cancel-hide-mark-article): $B?74X?t!#(B (navi2ch-board-cancel-hide-mark-article): $B?74X?t!#(B
(navi2ch-board-hide-mode-map): $B>e5-4X?t$r(B "md" $B$K%P%$%s%I!#(B (navi2ch-board-hide-mode-map): $B>e5-4X?t$r(B "md" $B$K%P%$%s%I!#(B

* navi2ch-bookmark.el * navi2ch-bookmark.el
(navi2ch-bookmark-cut-mark-article): $B?74X?t!#(B (navi2ch-bookmark-cut-mark-article): $B?74X?t!#(B
(navi2ch-bookmark-mode-map): $B>e5-4X?t$r(B "md" $B$K%P%$%s%I!#(B (navi2ch-bookmark-mode-map): $B>e5-4X?t$r(B "md" $B$K%P%$%s%I!#(B

* navi2ch-history.el * navi2ch-history.el
(navi2ch-history-delete-mark-articlle): $B?74X?t!#(B (navi2ch-history-delete-mark-articlle): $B?74X?t!#(B
(navi2ch-history-mode-map): $B>e5-4X?t$r(B "md" $B$K%P%$%s%I!#(B (navi2ch-history-mode-map): $B>e5-4X?t$r(B "md" $B$K%P%$%s%I!#(B
Expand Down Expand Up @@ -5160,7 +5163,7 @@


2002-01-18 Taiki SUGAWARA <taiki.s@cityfujisawa.ne.jp> 2002-01-18 Taiki SUGAWARA <taiki.s@cityfujisawa.ne.jp>


* navi2ch 1.5 $B%j%j!<%9!#(B navi2ch 1.5 $B%j%j!<%9!#(B


* TODO: $B@0M}!#(B * TODO: $B@0M}!#(B


Expand Down Expand Up @@ -5838,7 +5841,7 @@


2002-01-08 Taiki SUGAWARA <taiki.s@cityfujisawa.ne.jp> 2002-01-08 Taiki SUGAWARA <taiki.s@cityfujisawa.ne.jp>


* navi2ch-board.el ~giko $B$J$H$3$m$K$"$kHD$KBP=h!#(B * navi2ch-board.el: ~giko $B$J$H$3$m$K$"$kHD$KBP=h!#(B
(navi2ch-board-get-home-uri): $B?74X?t!#(B (navi2ch-board-get-home-uri): $B?74X?t!#(B
(navi2ch-board-get-readcgi-url): $B>e5-4X?t$r;H$&$h$&$K!#(B (navi2ch-board-get-readcgi-url): $B>e5-4X?t$r;H$&$h$&$K!#(B


Expand Down
4 changes: 4 additions & 0 deletions doc/ChangeLog
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,7 @@
2008-01-31 Naohiro Aota <nao.aota@gmail.com>

* navi2ch.texi: Copyright $B$NI=5-$r99?7!#(B

2008-01-30 Naohiro Aota <nao.aota@gmail.com> 2008-01-30 Naohiro Aota <nao.aota@gmail.com>


* navi2ch.texi (Global Key Bindings): C-c C-l $B$N%-!<%P%$%s%I$K$D$$(B * navi2ch.texi (Global Key Bindings): C-c C-l $B$N%-!<%P%$%s%I$K$D$$(B
Expand Down
4 changes: 2 additions & 2 deletions doc/navi2ch.texi
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
@page @page
@vskip 0pt plus 1filll @vskip 0pt plus 1filll


Copyright @copyright{} 2002-2004 by Navi2ch Project Copyright @copyright{} 2002-2008 by Navi2ch Project


Permission is granted to make and distribute verbatim copies of this Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are manual provided the copyright notice and this permission notice are
Expand All @@ -59,7 +59,7 @@ translation approved by the Free Software Foundation.
@ifnottex @ifnottex
@value{REVISION} @value{REVISION}


Copyright @copyright{} 2002-2004 by Navi2ch Project Copyright @copyright{} 2002-2008 by Navi2ch Project


Permission is granted to make and distribute verbatim copies of this Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are manual provided the copyright notice and this permission notice are
Expand Down
72 changes: 33 additions & 39 deletions navi2ch-article.el
Original file line number Original file line Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; navi2ch-article.el --- article view module for navi2ch ;;; navi2ch-article.el --- article view module for navi2ch


;; Copyright (C) 2000-2004 by Navi2ch Project ;; Copyright (C) 2000-2008 by Navi2ch Project


;; Author: Taiki SUGAWARA <taiki@users.sourceforge.net> ;; Author: Taiki SUGAWARA <taiki@users.sourceforge.net>
;; Keywords: network, 2ch ;; Keywords: network, 2ch
Expand Down Expand Up @@ -234,18 +234,18 @@ last $B$,:G8e$+$i$$$/$DI=<($9$k$+!#(B
(file-name-sans-extension (file-name-nondirectory filename))) (file-name-sans-extension (file-name-nondirectory filename)))




(defun navi2ch-article-inside-range-p (num range len) (defsubst navi2ch-article-inside-range-p (num range len)
"NUM $B$,(B RANGE $B$G<($9HO0O$KF~$C$F$k$+!#(B "NUM $B$,(B RANGE $B$G<($9HO0O$KF~$C$F$k$+!#(B
LEN $B$O(B RANGE $B$GHO0O$r;XDj$5$l$k(B list $B$ND9$5!#(B" LEN $B$O(B RANGE $B$GHO0O$r;XDj$5$l$k(B list $B$ND9$5!#(B"
(or (not range) (or (not range)
(<= num (car range)) (<= num (car range))
(> num (- len (cdr range))))) (> num (- len (cdr range)))))


(defun navi2ch-article-get-buffer-name (board article) (defsubst navi2ch-article-get-buffer-name (board article)
(concat navi2ch-article-buffer-name-prefix (concat navi2ch-article-buffer-name-prefix
(navi2ch-article-get-url board article 'no-kako))) (navi2ch-article-get-url board article 'no-kako)))


(defun navi2ch-article-check-cached (board article) (defsubst navi2ch-article-check-cached (board article)
"BOARD $B$H(B ARTICLE $B$G;XDj$5$l$k%9%l%C%I$,%-%c%C%7%e$5$l$F$k$+!#(B" "BOARD $B$H(B ARTICLE $B$G;XDj$5$l$k%9%l%C%I$,%-%c%C%7%e$5$l$F$k$+!#(B"
(cond ((get-buffer (navi2ch-article-get-buffer-name board article)) (cond ((get-buffer (navi2ch-article-get-buffer-name board article))
'view) 'view)
Expand Down Expand Up @@ -1046,16 +1046,19 @@ NUM $B$,(B -1 $B$N$H$-$O(B sticky $B%P%C%U%!$b4^$a$F$9$Y$F:o=|!#(B"
(interactive "P") (interactive "P")
(when (not (numberp num)) ; C-u $B$N$_$N;~(B4$B8D$K$7$?$$$o$1$8$c$J$$$H;W$o$l(B (when (not (numberp num)) ; C-u $B$N$_$N;~(B4$B8D$K$7$?$$$o$1$8$c$J$$$H;W$o$l(B
(setq num navi2ch-article-max-buffers)) (setq num navi2ch-article-max-buffers))
(let ((buffer-num (length (navi2ch-article-buffer-list))) (let* ((buffer-list (navi2ch-article-buffer-list))
buffer-list) (buffer-num (length buffer-list)))
(when (> buffer-num num) (when (> buffer-num num)
(if (< num 0) (unless (< num 0)
(setq buffer-list (navi2ch-article-buffer-list))
(save-excursion (save-excursion
(dolist (buf (navi2ch-article-buffer-list)) (setq buffer-list
(set-buffer buf) (nreverse
(unless navi2ch-article-sticky-mode (apply 'append
(push buf buffer-list))))) (mapcar (lambda (buf)
(set-buffer buf)
(and (not navi2ch-article-sticky-mode)
(list buf)))
buffer-list))))))
(catch 'loop (catch 'loop
(dolist (buf buffer-list) (dolist (buf buffer-list)
(kill-buffer buf) (kill-buffer buf)
Expand Down Expand Up @@ -1177,9 +1180,14 @@ DONT-DISPLAY $B$,(B non-nil $B$N$H$-$O%9%l%P%C%U%!$rI=<($;$:$K<B9T!#(B"
(run-hooks 'navi2ch-article-mode-hook)) (run-hooks 'navi2ch-article-mode-hook))


(defun navi2ch-article-kill-buffer-hook () (defun navi2ch-article-kill-buffer-hook ()
(navi2ch-bm-update-article navi2ch-article-current-board ;; update $B$G$"$l$P(B cache $B$K$7$J$$(B
navi2ch-article-current-article ;; view $B$G$"$C$?$b$N$,(B update $B$K$J$C$?8e$K(B kill $B$5$l$?;~$NBP:v(B
'cache) (unless (eq (navi2ch-bm-get-state-from-article navi2ch-article-current-board
navi2ch-article-current-article)
'update)
(navi2ch-bm-update-article navi2ch-article-current-board
navi2ch-article-current-article
'cache))
(navi2ch-article-save-info)) (navi2ch-article-save-info))


(defun navi2ch-article-exit (&optional kill) (defun navi2ch-article-exit (&optional kill)
Expand Down Expand Up @@ -1557,14 +1565,8 @@ FIRST $B$,(B nil $B$J$i$P!"%U%!%$%k$,99?7$5$l$F$J$1$l$P2?$b$7$J$$!#(B"
(alist (mapcar (alist (mapcar
(lambda (x) (lambda (x)
(assq x article-tmp)) (assq x article-tmp))
navi2ch-article-save-info-keys)) navi2ch-article-save-info-keys)))
(info-file (navi2ch-article-get-info-file-name board article))) (navi2ch-save-info (navi2ch-article-get-info-file-name board article) alist)
(navi2ch-save-info info-file alist)
(or navi2ch-article-info-cache
(setq navi2ch-article-info-cache
(navi2ch-make-cache navi2ch-article-info-cache-limit
'equal)))
(navi2ch-cache-put info-file alist navi2ch-article-info-cache)
(navi2ch-article-save-message-filter-cache board article))))) (navi2ch-article-save-message-filter-cache board article)))))


(defun navi2ch-article-load-info (&optional board article) (defun navi2ch-article-load-info (&optional board article)
Expand All @@ -1574,14 +1576,7 @@ FIRST $B$,(B nil $B$J$i$P!"%U%!%$%k$,99?7$5$l$F$J$1$l$P2?$b$7$J$$!#(B"
(or board (setq board navi2ch-article-current-board)) (or board (setq board navi2ch-article-current-board))
(or article (setq article navi2ch-article-current-article))) (or article (setq article navi2ch-article-current-article)))
(when (and (not ignore) board article) (when (and (not ignore) board article)
(or navi2ch-article-info-cache (setq alist (navi2ch-load-info (navi2ch-article-get-info-file-name board article)))
(setq navi2ch-article-info-cache
(navi2ch-make-cache navi2ch-article-info-cache-limit
'equal)))
(setq info-file (navi2ch-article-get-info-file-name board article))
(setq alist (navi2ch-cache-get info-file
(navi2ch-load-info info-file)
navi2ch-article-info-cache))
(dolist (x alist) (dolist (x alist)
(setq article (navi2ch-put-alist (car x) (cdr x) article))) (setq article (navi2ch-put-alist (car x) (cdr x) article)))
article))) article)))
Expand Down Expand Up @@ -2024,7 +2019,7 @@ NUM $B$,(B 1 $B$N$H$-$O<!!"(B-1 $B$N$H$-$OA0$N%9%l$K0\F0!#(B
(interactive) (interactive)
(navi2ch-article-through-subr (interactive-p) -1)) (navi2ch-article-through-subr (interactive-p) -1))


(defun navi2ch-article-get-message (num) (defsubst navi2ch-article-get-message (num)
"NUM $BHVL\$N%l%9$rF@$k!#(B" "NUM $BHVL\$N%l%9$rF@$k!#(B"
(cdr (assq num navi2ch-article-message-list))) (cdr (assq num navi2ch-article-message-list)))


Expand All @@ -2037,11 +2032,11 @@ NUM $B$,(B 1 $B$N$H$-$O<!!"(B-1 $B$N$H$-$OA0$N%9%l$K0\F0!#(B
'current-number)) 'current-number))
(error nil))) (error nil)))


(defun navi2ch-article-get-current-name () (defsubst navi2ch-article-get-current-name ()
(cdr (assq 'name (cdr (assq (navi2ch-article-get-current-number) (cdr (assq 'name (cdr (assq (navi2ch-article-get-current-number)
navi2ch-article-message-list))))) navi2ch-article-message-list)))))


(defun navi2ch-article-get-current-mail () (defsubst navi2ch-article-get-current-mail ()
(cdr (assq 'mail (cdr (assq (navi2ch-article-get-current-number) (cdr (assq 'mail (cdr (assq (navi2ch-article-get-current-number)
navi2ch-article-message-list))))) navi2ch-article-message-list)))))


Expand Down Expand Up @@ -2831,12 +2826,12 @@ ASK $B$,(B non-nil $B$@$H!"%G%3!<%I$7$?$b$N$NJ8;z%3!<%I$H05=L7A<0$rJ9$$$F$/$k
(navi2ch-article-get-message (navi2ch-article-get-message
(navi2ch-article-get-current-number)))))) (navi2ch-article-get-current-number))))))


(defun navi2ch-article-load-article-summary (board) (defsubst navi2ch-article-load-article-summary (board)
(navi2ch-load-info (navi2ch-board-get-file-name (navi2ch-load-info (navi2ch-board-get-file-name
board board
navi2ch-article-summary-file-name))) navi2ch-article-summary-file-name)))


(defun navi2ch-article-save-article-summary (board summary) (defsubst navi2ch-article-save-article-summary (board summary)
(navi2ch-save-info (navi2ch-board-get-file-name (navi2ch-save-info (navi2ch-board-get-file-name
board board
navi2ch-article-summary-file-name) navi2ch-article-summary-file-name)
Expand Down Expand Up @@ -2910,8 +2905,7 @@ STICKY $B$,(B non-nil $B$N$H$-$O<!$N(B sticky article buffer $B$K@Z$jBX$($k
(interactive "P") (interactive "P")
(let (buf) (let (buf)
(dolist (x (buffer-list)) (dolist (x (buffer-list))
(when (save-excursion (when (with-current-buffer x
(set-buffer x)
(and (eq major-mode 'navi2ch-article-mode) (and (eq major-mode 'navi2ch-article-mode)
(or (not sticky) (or (not sticky)
navi2ch-article-sticky-mode))) navi2ch-article-sticky-mode)))
Expand Down Expand Up @@ -3195,7 +3189,7 @@ FUNC $B$O(B (NUMBER, LIST) $B$r0z?t$K<h$k4X?t$G$"$k;v!#(B"
" Filter" " Filter"
navi2ch-article-message-filter-mode-map) navi2ch-article-message-filter-mode-map)


(defun navi2ch-article-get-message-filter-cache-file-name (board article) (defsubst navi2ch-article-get-message-filter-cache-file-name (board article)
(concat (navi2ch-article-get-info-file-name board article) ".filter")) (concat (navi2ch-article-get-info-file-name board article) ".filter"))


(defun navi2ch-article-save-message-filter-cache (&optional board article cache) (defun navi2ch-article-save-message-filter-cache (&optional board article cache)
Expand Down
Loading

0 comments on commit 4fa2691

Please sign in to comment.