Browse files

* navi2ch.el: Update copyright years.

(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...
1 parent cdebe90 commit 4fa2691182482ddbbb2e73cbbbd9e78bba22002b nawota committed Jan 31, 2008
View
97 ChangeLog
@@ -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>
* navi2ch-vars.el (navi2ch-global-map): C-c C-l $B$K(B
@@ -921,7 +1010,7 @@
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>
@@ -1519,7 +1608,7 @@
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>
@@ -1847,7 +1936,7 @@
* navi2ch-vars.el (navi2ch-global-view-map):
[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-bm-insert-subject): $B>e5-4X?t$r;HMQ!#(B
@@ -2019,7 +2108,7 @@
* navi2ch.el: eval-last-sexp, shell-command $B$K(B advice $BDI2C!#(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>
View
7 ChangeLog.1
@@ -475,10 +475,9 @@
(navi2ch-bm-mark): $B0z?t(B ARG $B$r<h$k$h$&$K!#>e$KDI?o(B
(navi2ch-bm-unmark): $BF1>e(B
- * (navi2ch-board-window-height): navi2ch-vars.el $B$GDj5A$7$F$$$?$N(B
- $B$G:o=|(B
+ * navi2ch-vars.el (navi2ch-board-window-height): navi2ch-vars.el $B$G(B
+ $BDj5A$7$F$$$?$N$G:o=|(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-bm-next-line $B$r;H$&$h$&$K(B
@@ -489,6 +488,8 @@
(navi2ch-net-setting-file-name): $BF1>e(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-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>
View
11 ChangeLog.2
@@ -2281,7 +2281,7 @@
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
@@ -3981,7 +3981,7 @@
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-bm-sort): navi2ch-bm-sort-by-date $B$r;H$&$h$&$K!#(B
@@ -3991,16 +3991,19 @@
* navi2ch-articles.el
(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-board.el
(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-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-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-bookmark.el
(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-history.el
(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
@@ -5160,7 +5163,7 @@
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
@@ -5838,7 +5841,7 @@
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-readcgi-url): $B>e5-4X?t$r;H$&$h$&$K!#(B
View
4 doc/ChangeLog
@@ -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>
* navi2ch.texi (Global Key Bindings): C-c C-l $B$N%-!<%P%$%s%I$K$D$$(B
View
4 doc/navi2ch.texi
@@ -37,7 +37,7 @@
@page
@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
manual provided the copyright notice and this permission notice are
@@ -59,7 +59,7 @@ translation approved by the Free Software Foundation.
@ifnottex
@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
manual provided the copyright notice and this permission notice are
View
72 navi2ch-article.el
@@ -1,6 +1,6 @@
;;; 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>
;; Keywords: network, 2ch
@@ -234,18 +234,18 @@ last $B$,:G8e$+$i$$$/$DI=<($9$k$+!#(B
(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
LEN $B$O(B RANGE $B$GHO0O$r;XDj$5$l$k(B list $B$ND9$5!#(B"
(or (not range)
(<= num (car 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
(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"
(cond ((get-buffer (navi2ch-article-get-buffer-name board article))
'view)
@@ -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")
(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))
- (let ((buffer-num (length (navi2ch-article-buffer-list)))
- buffer-list)
+ (let* ((buffer-list (navi2ch-article-buffer-list))
+ (buffer-num (length buffer-list)))
(when (> buffer-num num)
- (if (< num 0)
- (setq buffer-list (navi2ch-article-buffer-list))
+ (unless (< num 0)
(save-excursion
- (dolist (buf (navi2ch-article-buffer-list))
- (set-buffer buf)
- (unless navi2ch-article-sticky-mode
- (push buf buffer-list)))))
+ (setq buffer-list
+ (nreverse
+ (apply 'append
+ (mapcar (lambda (buf)
+ (set-buffer buf)
+ (and (not navi2ch-article-sticky-mode)
+ (list buf)))
+ buffer-list))))))
(catch 'loop
(dolist (buf buffer-list)
(kill-buffer buf)
@@ -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))
(defun navi2ch-article-kill-buffer-hook ()
- (navi2ch-bm-update-article navi2ch-article-current-board
- navi2ch-article-current-article
- 'cache)
+ ;; update $B$G$"$l$P(B cache $B$K$7$J$$(B
+ ;; view $B$G$"$C$?$b$N$,(B update $B$K$J$C$?8e$K(B kill $B$5$l$?;~$NBP:v(B
+ (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))
(defun navi2ch-article-exit (&optional kill)
@@ -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
(lambda (x)
(assq x article-tmp))
- navi2ch-article-save-info-keys))
- (info-file (navi2ch-article-get-info-file-name board article)))
- (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-info-keys)))
+ (navi2ch-save-info (navi2ch-article-get-info-file-name board article) alist)
(navi2ch-article-save-message-filter-cache board article)))))
(defun navi2ch-article-load-info (&optional board article)
@@ -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 article (setq article navi2ch-article-current-article)))
(when (and (not ignore) board article)
- (or navi2ch-article-info-cache
- (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))
+ (setq alist (navi2ch-load-info (navi2ch-article-get-info-file-name board article)))
(dolist (x alist)
(setq article (navi2ch-put-alist (car x) (cdr x) article)))
article)))
@@ -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)
(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"
(cdr (assq num navi2ch-article-message-list)))
@@ -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))
(error nil)))
-(defun navi2ch-article-get-current-name ()
+(defsubst navi2ch-article-get-current-name ()
(cdr (assq 'name (cdr (assq (navi2ch-article-get-current-number)
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)
navi2ch-article-message-list)))))
@@ -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-current-number))))))
-(defun navi2ch-article-load-article-summary (board)
+(defsubst navi2ch-article-load-article-summary (board)
(navi2ch-load-info (navi2ch-board-get-file-name
board
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
board
navi2ch-article-summary-file-name)
@@ -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")
(let (buf)
(dolist (x (buffer-list))
- (when (save-excursion
- (set-buffer x)
+ (when (with-current-buffer x
(and (eq major-mode 'navi2ch-article-mode)
(or (not sticky)
navi2ch-article-sticky-mode)))
@@ -3195,7 +3189,7 @@ FUNC $B$O(B (NUMBER, LIST) $B$r0z?t$K<h$k4X?t$G$"$k;v!#(B"
" Filter"
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"))
(defun navi2ch-article-save-message-filter-cache (&optional board article cache)
View
2 navi2ch-articles.el
@@ -1,6 +1,6 @@
;;; navi2ch-articles.el --- Article List Module for Navi2ch
-;; Copyright (C) 2001-2004 by Navi2ch Project
+;; Copyright (C) 2001-2004, 2008 by Navi2ch Project
;; Author: Taiki SUGAWARA <taiki@users.sourceforge.net>
;; Keywords: 2ch, network
View
2 navi2ch-auto-modify.el
@@ -1,6 +1,6 @@
;;; navi2ch-auto-modify.el --- auto file modification module for navi2ch
-;; Copyright (C) 2003 by Navi2ch Project
+;; Copyright (C) 2003, 2005, 2006 by Navi2ch Project
;; Author: extra <ekisutora@users.sourceforge.net>
;; Keywords: network, 2ch
View
2 navi2ch-be2ch.el
@@ -1,6 +1,6 @@
;;; navi2ch-be2ch.el --- View be@2ch module for Navi2ch.
-;; Copyright (C) 2005 by Navi2ch Project
+;; Copyright (C) 2005, 2008 by Navi2ch Project
;; Author: Taiki SUGAWARA <taiki@users.sourceforge.net>
;; Keywords: network, 2ch
View
12 navi2ch-board-misc.el
@@ -1,6 +1,6 @@
;;; navi2ch-board-misc.el --- Miscellaneous Functions for Navi2ch Board Mode
-;; Copyright (C) 2001-2004 by Navi2ch Project
+;; Copyright (C) 2001-2006, 2008 by Navi2ch Project
;; Author: Taiki SUGAWARA <taiki@users.sourceforge.net>
;; Keywords: 2ch, network
@@ -296,16 +296,16 @@
(navi2ch-list)))))
;;; goto-*-column
-(defun navi2ch-bm-goto-updated-mark-column ()
+(defsubst navi2ch-bm-goto-updated-mark-column ()
(beginning-of-line)
(when (looking-at " *[0-9]+ ")
(goto-char (match-end 0))))
-(defun navi2ch-bm-goto-state-column ()
+(defsubst navi2ch-bm-goto-state-column ()
(when (navi2ch-bm-goto-updated-mark-column)
(forward-char 1)))
-(defun navi2ch-bm-goto-mark-column ()
+(defsubst navi2ch-bm-goto-mark-column ()
(when (navi2ch-bm-goto-updated-mark-column)
(forward-char 2)))
@@ -336,11 +336,11 @@
(navi2ch-line-end-position)
item state updated))))
-(defun navi2ch-bm-get-state (&optional point)
+(defsubst navi2ch-bm-get-state (&optional point)
"$B$=$N0LCV$N(B state $B$rD4$Y$k!#(B"
(get-text-property (or point (point)) 'navi2ch-bm-state))
-(defun navi2ch-bm-get-updated-mark (&optional point)
+(defsubst navi2ch-bm-get-updated-mark (&optional point)
"$B$=$N0LCV$N(B updated-mark $B$rD4$Y$k!#(B"
(get-text-property (or point (point)) 'navi2ch-bm-updated))
View
17 navi2ch-board.el
@@ -1,6 +1,6 @@
;;; navi2ch-board.el --- subject list module for navi2ch
-;; Copyright (C) 2000-2004 by Navi2ch Project
+;; Copyright (C) 2000-2006, 2008 by Navi2ch Project
;; Author: Taiki SUGAWARA <taiki@users.sourceforge.net>
;; Keywords: network, 2ch
@@ -112,22 +112,21 @@
(setq navi2ch-board-updated-mode-map (make-sparse-keymap)))
;;; navi2ch-bm callbacks
-(defun navi2ch-board-set-property (begin end item)
+(defsubst navi2ch-board-set-property (begin end item)
(put-text-property begin end 'article item))
-(defun navi2ch-board-get-property (point)
+(defsubst navi2ch-board-get-property (point)
(get-text-property (save-excursion (goto-char point)
(beginning-of-line)
(point))
'article))
-(defun navi2ch-board-get-article (item)
- item)
+(defalias 'navi2ch-board-get-article 'identity)
-(defun navi2ch-board-get-board (item)
+(defsubst navi2ch-board-get-board (item)
navi2ch-board-current-board)
-(defun navi2ch-board-exit ()
+(defsubst navi2ch-board-exit ()
(run-hooks 'navi2ch-board-exit-hook)
(navi2ch-board-save-info))
@@ -138,7 +137,7 @@
(add-hook 'navi2ch-save-status-hook 'navi2ch-board-save-info)
;;; navi2ch-board functions
-(defun navi2ch-board-get-uri (board)
+(defsubst navi2ch-board-get-uri (board)
"$B8e$m$N(B / $B$,IU$$$?(B uri $B$rJV$9!#(B"
(let ((uri (cdr (assq 'uri board))))
(when uri
@@ -187,7 +186,7 @@
(defsubst navi2ch-board-from-file-p (board)
(string= (cdr (assq 'name board)) navi2ch-board-name-from-file))
-(defun navi2ch-board-get-matched-article ()
+(defsubst navi2ch-board-get-matched-article ()
"match $B$7$?7k2L$+$i(B article $B$rF@$k!#(B"
(let ((id (match-string 1))
(str (match-string 2))
View
17 navi2ch-bookmark.el
@@ -1,6 +1,6 @@
;;; navi2ch-bookmark.el --- global bookmark module for navi2ch
-;; Copyright (C) 2001-2004 by Navi2ch Project
+;; Copyright (C) 2001-2006, 2008 by Navi2ch Project
;; Author: Taiki SUGAWARA <taiki@users.sourceforge.net>
;; Keywords: network, 2ch
@@ -77,26 +77,26 @@ KEY $B$O(B (concat URI ARTID)")
(defun navi2ch-bookmark-set-property (begin end item)
(put-text-property begin end 'item item))
-(defun navi2ch-bookmark-get-property (point)
+(defsubst navi2ch-bookmark-get-property (point)
(get-text-property
(save-excursion (goto-char point)
(beginning-of-line)
(point))
'item))
-(defun navi2ch-bookmark-get-article (item)
+(defsubst navi2ch-bookmark-get-article (item)
(cdr (assq 'article
(cdr (assoc item
(cddr (assoc navi2ch-bookmark-current-bookmark-id
navi2ch-bookmark-list)))))))
-(defun navi2ch-bookmark-get-board (item)
+(defsubst navi2ch-bookmark-get-board (item)
(cdr (assq 'board
(cdr (assoc item
(cddr (assoc navi2ch-bookmark-current-bookmark-id
navi2ch-bookmark-list)))))))
-(defun navi2ch-bookmark-exit ()
+(defsubst navi2ch-bookmark-exit ()
(run-hooks 'navi2ch-bookmark-exit-hook))
;; regist board
@@ -440,9 +440,10 @@ KEY $B$O(B (concat URI ARTID)")
(board-uri (cdr (assq 'uri board)))
(art-id (cdr (assq 'artid article)))
(res (string-to-number
- (cdr (assq 'response
- (navi2ch-article-load-info board
- article)))))
+ (or (cdr (assq 'response
+ (navi2ch-article-load-info board
+ article)))
+ "0")))
new-res board-data)
(when (or (null navi2ch-bookmark-fetch-mark-article-no-check-regexp)
(not (string-match navi2ch-bookmark-fetch-mark-article-no-check-regexp
View
2 navi2ch-directory.el
@@ -1,6 +1,6 @@
;;; navi2ch-directory.el --- List directory files Module for Navi2ch
-;; Copyright (C) 2002, 2004 by Navi2ch Project
+;; Copyright (C) 2002-2005, 2008 by Navi2ch Project
;; Author: Taiki SUGAWARA <taiki@users.sourceforge.net>
;; Keywords: 2ch, network
View
2 navi2ch-face.el
@@ -1,6 +1,6 @@
;;; navi2ch-face.el --- face definitions for navi2ch
-;; Copyright (C) 2001-2004 by Navi2ch Project
+;; Copyright (C) 2001-2006 by Navi2ch Project
;; Author: Taiki SUGAWARA <taiki@users.sourceforge.net>
;; Keywords: network 2ch
View
2 navi2ch-futaba.el
@@ -1,6 +1,6 @@
;;; navi2ch-futaba.el --- View futaba module for Navi2ch.
-;; Copyright (C) 2002 by Navi2ch Project
+;; Copyright (C) 2002-2004 by Navi2ch Project
;; Author:
View
2 navi2ch-head.el
@@ -1,6 +1,6 @@
;;; navi2ch-head.el --- View a local rule mode for navi2ch
-;; Copyright (C) 2001-2003 by Navi2ch Project
+;; Copyright (C) 2001-2003, 2008 by Navi2ch Project
;; Author: $BI($rBG$D<T(B
;; Keywords: www, 2ch
View
2 navi2ch-history.el
@@ -1,6 +1,6 @@
;;; navi2ch-history.el --- global history module for navi2ch
-;; Copyright (C) 2001-2003 by Navi2ch Project
+;; Copyright (C) 2001-2004, 2006, 2008 by Navi2ch Project
;; Author: Taiki SUGAWARA <taiki@users.sourceforge.net>
;; Keywords: network, 2ch
View
2 navi2ch-http-date.el
@@ -1,6 +1,6 @@
;;; navi2ch-http-date.el --- parser / generator of HTTP-date format
-;; Copyright (C) 2002, 2004 Navi2ch Project
+;; Copyright (C) 2002, 2003, 2008 by Navi2ch Project
;; Author: Nanashi San <nanashi@users.sourceforge.net>
;; Keywords: 2ch, network
View
2 navi2ch-jbbs-net.el
@@ -1,6 +1,6 @@
;;; navi2ch-jbbs-net.el --- View jbbs.net module for Navi2ch.
-;; Copyright (C) 2002, 2004 by Navi2ch Project
+;; Copyright (C) 2002-2004 by Navi2ch Project
;; Author:
;; Part5 $B%9%l$N(B 509 $B$NL>L5$7$5$s(B
View
2 navi2ch-jbbs-shitaraba.el
@@ -1,6 +1,6 @@
;;; navi2ch-jbbs-shitaraba.el --- View jbbs-shitaraba module for Navi2ch.
-;; Copyright (C) 2002, 2004 by Navi2ch Project
+;; Copyright (C) 2002-2004, 2006 by Navi2ch Project
;; Author:
;; Part5 $B%9%l$N(B 509 $B$NL>L5$7$5$s(B
View
2 navi2ch-list.el
@@ -1,6 +1,6 @@
;;; navi2ch-list.el --- board list module for navi2ch
-;; Copyright (C) 2000-2004 by Navi2ch Project
+;; Copyright (C) 2000-2004, 2005, 2008 by Navi2ch Project
;; Author: Taiki SUGAWARA <taiki@users.sourceforge.net>
;; Keywords: network, 2ch
View
2 navi2ch-localfile.el
@@ -1,6 +1,6 @@
;;; navi2ch-localfile.el --- View localfile for Navi2ch.
-;; Copyright (C) 2002, 2004 by Navi2ch Project
+;; Copyright (C) 2002-2005, 2007, 2008 by Navi2ch Project
;; Author: Nanashi San <nanashi@users.sourceforge.net>
;; Part6 $B%9%l$N(B 427 $B$NL>L5$7$5$s(B
View
2 navi2ch-megabbs.el
@@ -1,6 +1,6 @@
;;; navi2ch-megabbs.el --- View megabbs.net module for Navi2ch.
-;; Copyright (C) 2002, 2004 by Navi2ch Project
+;; Copyright (C) 2002, 2004, 2006 by Navi2ch Project
;; Author:
;; Part5 $B%9%l$N(B 509 $B$NL>L5$7$5$s(B
View
2 navi2ch-message.el
@@ -1,6 +1,6 @@
;;; navi2ch-message.el --- write message module for navi2ch
-;; Copyright (C) 2000-2004, 2008 by Navi2ch Project
+;; Copyright (C) 2000-2006, 2008 by Navi2ch Project
;; Author: Taiki SUGAWARA <taiki@users.sourceforge.net>
;; Keywords: network, 2ch
View
12 navi2ch-multibbs.el
@@ -1,6 +1,6 @@
;;; navi2ch-multibbs.el --- View 2ch like BBS module for Navi2ch.
-;; Copyright (C) 2002-2004, 2008 by Navi2ch Project
+;; Copyright (C) 2002-2006, 2008 by Navi2ch Project
;; Author:
;; Part5 $B%9%l$N(B 509 $B$NL>L5$7$5$s(B
@@ -137,7 +137,7 @@ CODING-SYSTEM-VAR:
(setcdr board
(cons (cons 'bbstype type) (cdr board)))))
-(defun navi2ch-multibbs-get-bbstype (board)
+(defsubst navi2ch-multibbs-get-bbstype (board)
(let ((type (cdr (assq 'bbstype board))))
(unless type
(setq type (navi2ch-multibbs-url-to-bbstype
@@ -203,7 +203,7 @@ SPEC $B$O(B (BBSTYPE [ARG]...)$B!#(B
(navi2ch-multibbs-get-bbstype board)
func default-func))
-(defun navi2ch-multibbs-get-func (bbstype func &optional default-func)
+(defsubst navi2ch-multibbs-get-func (bbstype func &optional default-func)
(let ((func-table (gethash bbstype navi2ch-multibbs-func-table)))
(or (and func-table
(gethash func func-table))
@@ -326,19 +326,19 @@ START, END, NOFIRST $B$GHO0O$r;XDj$9$k(B"
(message (concat message-str "failed"))))
(return nil)))))))
-(defun navi2ch-multibbs-board-update (board)
+(defsubst navi2ch-multibbs-board-update (board)
(let ((func (navi2ch-multibbs-get-func-from-board
board 'board-update 'navi2ch-2ch-board-update)))
(funcall func board)))
-(defun navi2ch-multibbs-board-get-file-name (board &optional file-name)
+(defsubst navi2ch-multibbs-board-get-file-name (board &optional file-name)
(let ((func (navi2ch-multibbs-get-func-from-board
board 'board-get-file-name 'navi2ch-2ch-board-get-file-name)))
(funcall func board file-name)))
;;;-----------------------------------------------
-(defun navi2ch-2ch-subject-callback ()
+(defsubst navi2ch-2ch-subject-callback ()
(when navi2ch-board-use-subback-html
(navi2ch-board-make-subject-txt)))
View
6 navi2ch-net.el
@@ -1,6 +1,6 @@
;;; navi2ch-net.el --- Network module for navi2ch
-;; Copyright (C) 2000-2004, 2008 by Navi2ch Project
+;; Copyright (C) 2000-2006, 2008 by Navi2ch Project
;; Author: Taiki SUGAWARA <taiki@users.sourceforge.net>
;; Keywords: network 2ch
@@ -931,13 +931,13 @@ This is taken from RFC 2396.")
(when (navi2ch-net-update-file url file 'file nil t)
file))))))
-(defun navi2ch-net-add-state (state header)
+(defsubst navi2ch-net-add-state (state header)
"HEADER $B$K(B STATE $B$rDI2C$9$k!#(B"
(navi2ch-put-alist (gethash state navi2ch-net-state-header-table)
"yes"
header))
-(defun navi2ch-net-get-state (state header)
+(defsubst navi2ch-net-get-state (state header)
"HEADER $B$+$i(B STATE $B$r<hF@$9$k!#(B"
(cdr (assq (gethash state navi2ch-net-state-header-table)
header)))
View
2 navi2ch-oyster.el
@@ -1,6 +1,6 @@
;;; navi2ch-oyster.el --- oyster module for Navi2ch.
-;; Copyright (C) 2002, 2004 by Navi2ch Project
+;; Copyright (C) 2002-2006 by Navi2ch Project
;; Author: MIZUNUMA Yuto <mizmiz@users.sourceforge.net>
;; Keywords: network 2ch
View
2 navi2ch-popup-article.el
@@ -1,6 +1,6 @@
;;; navi2ch-popup-article.el --- popup article module for navi2ch
-;; Copyright (C) 2001-2004, 2008 by Navi2ch Project
+;; Copyright (C) 2001-2004, 2006, 2008 by Navi2ch Project
;; Author: Taiki SUGAWARA <taiki@users.sourceforge.net>
;; Keywords: network, 2ch
View
2 navi2ch-search.el
@@ -1,6 +1,6 @@
;;; navi2ch-search.el --- Search Module for Navi2ch
-;; Copyright (C) 2001-2004 by Navi2ch Project
+;; Copyright (C) 2001-2005, 2008 by Navi2ch Project
;; Author: Taiki SUGAWARA <taiki@users.sourceforge.net>
;; Keywords: 2ch, network
View
25 navi2ch-util.el
@@ -1,6 +1,6 @@
;;; navi2ch-util.el --- useful utilities for navi2ch
-;; Copyright (C) 2000-2004, 2008 by Navi2ch Project
+;; Copyright (C) 2000-2008 by Navi2ch Project
;; Copyright (C) 1993-2000 Free Software Foundation, Inc.
;; Author: Taiki SUGAWARA <taiki@users.sourceforge.net>
@@ -583,7 +583,7 @@ don't offer a form of remote control."
(append navi2ch-browse-url-image-args (list url))))
;; from apel
-(defun navi2ch-put-alist (item value alist)
+(defsubst navi2ch-put-alist (item value alist)
"Modify ALIST to set VALUE to ITEM.
If there is a pair whose car is ITEM, replace its cdr by VALUE.
If there is not such pair, create new pair (ITEM . VALUE) and
@@ -936,7 +936,7 @@ base64$B%G%3!<%I$9$Y$-FbMF$,$J$$>l9g$O%(%i!<$K$J$k!#(B"
(cons regexp value))
(navi2ch-update-html-tag-regexp))
-(defun navi2ch-filename-to-url (filename)
+(defsubst navi2ch-filename-to-url (filename)
(concat "file://" (expand-file-name filename)))
(defun navi2ch-chop-/ (dirname)
@@ -945,7 +945,7 @@ base64$B%G%3!<%I$9$Y$-FbMF$,$J$$>l9g$O%(%i!<$K$J$k!#(B"
(replace-match "" nil t dirname)
dirname)))
-(defun navi2ch-rename-file (file newname &optional ok-if-already-exists)
+(defsubst navi2ch-rename-file (file newname &optional ok-if-already-exists)
(rename-file (navi2ch-chop-/ file)
(navi2ch-chop-/ newname) ok-if-already-exists))
@@ -1014,7 +1014,7 @@ LOCKNAME $B$,@dBP%Q%9$G$O$J$$>l9g!"(BDIRECTORY $B$+$i$NAjBP%Q%9$H$7$F07$&!#(
#'point-at-eol
#'line-end-position))
-(defun navi2ch-count-lines-file (file)
+(defsubst navi2ch-count-lines-file (file)
"$B$=$N%U%!%$%k$N9T?t$r?t$($k!#(B"
(with-temp-buffer
(insert-file-contents file)
@@ -1376,7 +1376,7 @@ BOUND NOERROR COUNT $B$O(B `re-search-forward' $B$K$=$N$^$^EO$5$l$k!#(B"
(setq bol (1+ (navi2ch-line-end-position))))))
(goto-char start))
-(defun navi2ch-read-only-string (string)
+(defsubst navi2ch-read-only-string (string)
(propertize string 'read-only t 'front-sticky t 'rear-nonsticky t))
(defsubst navi2ch-file-mtime (filename)
@@ -1385,13 +1385,16 @@ BOUND NOERROR COUNT $B$O(B `re-search-forward' $B$K$=$N$^$^EO$5$l$k!#(B"
(defsubst navi2ch-file-size (filename)
(nth 7 (file-attributes filename)))
-(defun navi2ch-float-time (&optional specified-time)
- "Return the current time, as a float number of seconds since the epoch.
+(defalias 'navi2ch-float-time
+ (if (fboundp 'float-time)
+ 'float-time
+ (lambda (&optional specified-time)
+ "Return the current time, as a float number of seconds since the epoch.
If an argument is given, it specifies a time to convert to float
instead of the current time."
- (apply (lambda (high low &optional usec)
- (+ (* high 65536.0) low (/ (or usec 0) 1000000.0)))
- (or specified-time (current-time))))
+ (apply (lambda (high low &optional usec)
+ (+ (* high 65536.0) low (/ (or usec 0) 1000000.0)))
+ (or specified-time (current-time))))))
(defalias 'navi2ch-make-local-hook
(if (>= emacs-major-version 22)
View
2 navi2ch-vars.el
@@ -1,6 +1,6 @@
;;; navi2ch-vars.el --- User variables for navi2ch.
-;; Copyright (C) 2001-2004, 2008 by Navi2ch Project
+;; Copyright (C) 2001-2008 by Navi2ch Project
;; Author: Taiki SUGAWARA <taiki@users.sourceforge.net>
;; Keywords: www 2ch
View
139 navi2ch.el
@@ -1,6 +1,6 @@
;;; navi2ch.el --- Navigator for 2ch for Emacsen
-;; Copyright (C) 2000-2004 by Navi2ch Project
+;; Copyright (C) 2000-2006, 2008 by Navi2ch Project
;; Author: Taiki SUGAWARA <taiki@users.sourceforge.net>
;; Keywords: network, 2ch
@@ -272,73 +272,90 @@ SUSPEND $B$,(B non-nil $B$J$i(B buffer $B$r>C$5$J$$!#(B"
'make-temp-file
'make-temp-name) file))
+(defvar navi2ch-info-cache nil)
+(defvar navi2ch-info-cache-limit 1000)
+
(defun navi2ch-save-info (file info &optional backup)
"lisp-object INFO $B$r(B FILE $B$KJ]B8$9$k!#(B
BACKUP $B$,(B non-nil $B$N>l9g$O85$N%U%!%$%k$r%P%C%/%"%C%W$9$k!#(B"
- (setq info (navi2ch-strip-properties info)
- file (expand-file-name file navi2ch-directory)) ; $B@dBP%Q%9$K$7$F$*$/(B
- (let ((dir (file-name-directory file)))
- (unless (file-exists-p dir)
- (make-directory dir t)))
- (when (or (file-regular-p file)
- (not (file-exists-p file)))
- (let ((coding-system-for-write navi2ch-coding-system)
- (backup-file (navi2ch-make-backup-file-name file))
- temp-file)
- (unwind-protect
- (progn
- ;; $B%U%!%$%k$,3N<B$K>C$($k$h$&!"2<$N(B setq $B$O>e$N(B let $B$K0\F0(B
- ;; $B$7$F$O%@%a(B
- (setq temp-file (navi2ch-make-temp-file
- (file-name-directory file)))
- (with-temp-file temp-file
- (let ((standard-output (current-buffer))
- print-length print-level)
- (princ ";;; -*- mode: emacs-lisp; -*-\n")
- (prin1 info)))
- (if (and backup (file-exists-p file))
- (rename-file file backup-file t))
- ;; $B>e$N(B rename $B$,@.8y$7$F2<$,<:GT$7$F$b!"(Bnavi2ch-load-info
- ;; $B$,%P%C%/%"%C%W%U%!%$%k$+$iFI$s$G$/$l$k!#(B
- (condition-case err
- (progn
- (unless (file-exists-p file)
- (with-temp-file file)) ; $B%U%!%$%k$,:n@.2DG=$+%A%'%C%/(B
- (rename-file temp-file file t))
- (file-error
- (message "%s: %s"
- (cadr err)
- (mapconcat #'identity (cddr err) ", ")))))
- (if (and temp-file (file-exists-p temp-file))
- (delete-file temp-file))))))
+ (setq file (expand-file-name file navi2ch-directory)) ; $B@dBP%Q%9$K$7$F$*$/(B
+ (unless navi2ch-info-cache
+ (setq navi2ch-info-cache
+ (navi2ch-make-cache navi2ch-info-cache-limit 'equal)))
+ (let ((cached-info (navi2ch-cache-get
+ file nil navi2ch-info-cache)))
+ (when (or (null cached-info)
+ (not (equal info cached-info)))
+ (navi2ch-cache-put file info navi2ch-info-cache)
+ (let ((dir (file-name-directory file)))
+ (unless (file-exists-p dir)
+ (make-directory dir t)))
+ (when (or (file-regular-p file)
+ (not (file-exists-p file)))
+ (let ((coding-system-for-write navi2ch-coding-system)
+ (backup-file (navi2ch-make-backup-file-name file))
+ temp-file)
+ (unwind-protect
+ (progn
+ ;; $B%U%!%$%k$,3N<B$K>C$($k$h$&!"2<$N(B setq $B$O>e$N(B let $B$K0\F0(B
+ ;; $B$7$F$O%@%a(B
+ (setq temp-file (navi2ch-make-temp-file
+ (file-name-directory file)))
+ (with-temp-file temp-file
+ (let ((standard-output (current-buffer))
+ print-length print-level)
+ (princ ";;; -*- mode: emacs-lisp; -*-\n")
+ (prin1 info)))
+ (if (and backup (file-exists-p file))
+ (rename-file file backup-file t))
+ ;; $B>e$N(B rename $B$,@.8y$7$F2<$,<:GT$7$F$b!"(Bnavi2ch-load-info
+ ;; $B$,%P%C%/%"%C%W%U%!%$%k$+$iFI$s$G$/$l$k!#(B
+ (condition-case err
+ (progn
+ (unless (file-exists-p file)
+ (with-temp-file file)) ; $B%U%!%$%k$,:n@.2DG=$+%A%'%C%/(B
+ (rename-file temp-file file t))
+ (file-error
+ (message "%s: %s"
+ (cadr err)
+ (mapconcat #'identity (cddr err) ", ")))))
+ (if (and temp-file (file-exists-p temp-file))
+ (delete-file temp-file))))))))
(defun navi2ch-load-info (file)
"FILE $B$+$i(B lisp-object $B$rFI$_9~$_!"$=$l$rJV$9!#(B"
(setq file (expand-file-name file navi2ch-directory)) ; $B@dBP%Q%9$K$7$F$*$/(B
- (let ((backup-file (navi2ch-make-backup-file-name file)))
- (when (and (file-exists-p backup-file)
- (file-regular-p backup-file)
- (or (not (file-exists-p file))
- (not (file-regular-p file))
- (file-newer-than-file-p backup-file file))
- (yes-or-no-p
- (format
- "%s $B$NFI$_9~$_$GLdBjH/@8!#%P%C%/%"%C%W%U%!%$%k$+$iFI$_9~$_$^$9$+(B? "
- file)))
- (setq file backup-file)))
- (when (file-regular-p file)
- (let ((coding-system-for-read navi2ch-coding-system))
- (navi2ch-ifemacsce
- (with-temp-buffer
- (insert-file-contents file)
- (goto-char (point-min))
- (while (search-forward "..." nil t)
- (replace-match ""))
- (car (read-from-string (buffer-string))))
- (with-temp-buffer
- (insert-file-contents file)
- (let ((standard-input (current-buffer)))
- (read)))))))
+ (unless navi2ch-info-cache
+ (setq navi2ch-info-cache
+ (navi2ch-make-cache navi2ch-info-cache-limit 'equal)))
+ (navi2ch-cache-get
+ file
+ (progn
+ (let ((backup-file (navi2ch-make-backup-file-name file)))
+ (when (and (file-exists-p backup-file)
+ (file-regular-p backup-file)
+ (or (not (file-exists-p file))
+ (not (file-regular-p file))
+ (file-newer-than-file-p backup-file file))
+ (yes-or-no-p
+ (format
+ "%s $B$NFI$_9~$_$GLdBjH/@8!#%P%C%/%"%C%W%U%!%$%k$+$iFI$_9~$_$^$9$+(B? "
+ file)))
+ (setq file backup-file)))
+ (when (file-regular-p file)
+ (let ((coding-system-for-read navi2ch-coding-system))
+ (navi2ch-ifemacsce
+ (with-temp-buffer
+ (insert-file-contents file)
+ (goto-char (point-min))
+ (while (search-forward "..." nil t)
+ (replace-match ""))
+ (car (read-from-string (buffer-string))))
+ (with-temp-buffer
+ (insert-file-contents file)
+ (let ((standard-input (current-buffer)))
+ (read)))))))
+ navi2ch-info-cache))
(defun navi2ch-split-window (display)
"window $B$rJ,3d$9$k!#(B

0 comments on commit 4fa2691

Please sign in to comment.