├── AUTHORS ├── contrib ├── .cvsignore ├── navi2ch-js-livedoor-move.el ├── Makefile.am ├── README ├── navi2ch-migemo.el ├── navi2ch-track-mouse.el ├── navi2ch-pizaunix.el ├── gikope.el ├── navi2ch-logo.el ├── ChangeLog └── Makefile.in ├── icons ├── .cvsignore ├── Makefile.am ├── plugged.xpm ├── COPYING ├── unplugged.xpm └── Makefile.in ├── test ├── Makefile.am ├── test.sh ├── test.el ├── ert │ └── ert-batch.el └── Makefile.in ├── TODO ├── doc ├── navi2ch.texi ├── Makefile.pmake ├── batch-texi2info.el ├── .cvsignore ├── Makefile.am └── releng.txt ├── .cvsignore ├── .gitignore ├── navi2ch-version.el ├── navi2ch-version.el.in ├── Makefile.old ├── acinclude.m4 ├── bcomp.el.in ├── README ├── navi2ch-config.el.in ├── bcomp.el ├── navi2ch-futaba.el ├── Makefile.am ├── navi2ch-xmas.el ├── configure.in ├── elisp-comp ├── navi2ch-e21.el ├── navi2ch-be2ch.el ├── mkinstalldirs ├── NEWS ├── navi2ch-directory.el ├── navi2ch-articles.el ├── navi2ch-http-date.el ├── navi2ch-jbbs-net.el ├── navi2ch-head.el ├── navi2ch-history.el ├── navi2ch-auto-modify.el ├── navi2ch-machibbs.el ├── INSTALL ├── install-sh ├── navi2ch-face.el └── navi2ch-jbbs-shitaraba.el /AUTHORS: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /contrib/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | -------------------------------------------------------------------------------- /icons/.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | -------------------------------------------------------------------------------- /test/Makefile.am: -------------------------------------------------------------------------------- 1 | TESTS= test.sh 2 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naota/navi2ch/HEAD/TODO -------------------------------------------------------------------------------- /test/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | emacs --batch --script test.el 4 | -------------------------------------------------------------------------------- /doc/navi2ch.texi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naota/navi2ch/HEAD/doc/navi2ch.texi -------------------------------------------------------------------------------- /icons/Makefile.am: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naota/navi2ch/HEAD/icons/Makefile.am -------------------------------------------------------------------------------- /doc/Makefile.pmake: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naota/navi2ch/HEAD/doc/Makefile.pmake -------------------------------------------------------------------------------- /doc/batch-texi2info.el: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naota/navi2ch/HEAD/doc/batch-texi2info.el -------------------------------------------------------------------------------- /contrib/navi2ch-js-livedoor-move.el: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/naota/navi2ch/HEAD/contrib/navi2ch-js-livedoor-move.el -------------------------------------------------------------------------------- /.cvsignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | autom4te.cache 3 | config.log 4 | config.status 5 | configure.lineno 6 | stamp-link 7 | *.tar.gz 8 | elc-stamp 9 | navi2ch-config.el 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.elc 2 | *~ 3 | Makefile 4 | config.log 5 | config.status 6 | doc/navi2ch.info 7 | elc-stamp 8 | navi2ch-config.el 9 | TAGS 10 | autom4te.cache/ 11 | -------------------------------------------------------------------------------- /navi2ch-version.el: -------------------------------------------------------------------------------- 1 | ;;; -*- Emacs-Lisp -*- 2 | ;;; @configure_input@ 3 | ;;; navi2ch-version.el.in --- template of navi2ch-version.el 4 | 5 | (provide 'navi2ch-version) 6 | (defconst navi2ch-version "2.0.0-DEV") 7 | -------------------------------------------------------------------------------- /navi2ch-version.el.in: -------------------------------------------------------------------------------- 1 | ;;; -*- Emacs-Lisp -*- 2 | ;;; @configure_input@ 3 | ;;; navi2ch-version.el.in --- template of navi2ch-version.el 4 | 5 | (provide 'navi2ch-version) 6 | (defconst navi2ch-version "@VERSION@") 7 | -------------------------------------------------------------------------------- /doc/.cvsignore: -------------------------------------------------------------------------------- 1 | *.tar.gz 2 | Makefile 3 | navi2ch.info 4 | navi2ch.html 5 | navi2ch.pdf 6 | navi2ch.dvi 7 | navi2ch.aux 8 | navi2ch.log 9 | navi2ch.toc 10 | navi2ch.cp 11 | navi2ch.fn 12 | navi2ch.ky 13 | navi2ch.pg 14 | navi2ch.tp 15 | navi2ch.vr 16 | navi2ch.cps 17 | navi2ch.fns 18 | navi2ch.kys 19 | navi2ch.pgs 20 | navi2ch.tps 21 | navi2ch.vrs 22 | -------------------------------------------------------------------------------- /contrib/Makefile.am: -------------------------------------------------------------------------------- 1 | EXTRA_DIST = gikope.el izonmoji-mode.el navi2ch-logo.el \ 2 | navi2ch-migemo.el navi2ch-pizaunix.el navi2ch-spamfilter.el \ 3 | navi2ch-track-mouse.el navi2ch-js-livedoor-move.el 4 | 5 | all: 6 | 7 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 8 | cd $(top_builddir) && \ 9 | CONFIG_HEADERS= CONFIG_LINKS= \ 10 | CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status 11 | -------------------------------------------------------------------------------- /Makefile.old: -------------------------------------------------------------------------------- 1 | EMACS = meadow95.exe 2 | #EMACS = emacs 3 | #EMACS = xemacs 4 | 5 | NAME = navi2ch-`date +%y%m%d%H%M` 6 | 7 | all: elc 8 | 9 | elc: 10 | $(EMACS) --batch -q -no-site-file -l "./bcomp.el" 11 | 12 | tgz: tar 13 | 14 | tar: 15 | cvs export -D now -d $(NAME) navi2ch; \ 16 | tar --numeric-owner -zcvf $(NAME).tar.gz $(NAME); \ 17 | rm -rf $(NAME) 18 | 19 | clean: 20 | rm -f *~ *.elc *.tgz *.tar.gz -------------------------------------------------------------------------------- /acinclude.m4: -------------------------------------------------------------------------------- 1 | # AC_EMACS_LISP(var, code) 2 | # Set `var' with output of elisp `code'. 3 | # To avoid incompatibilities of "single-quote in back-quote" etc, 4 | # temporary files are used to store emacs-lisp and output of it. 5 | AC_DEFUN([AC_EMACS_LISP],[dnl 6 | { ac_temp=./conftemp.$$ 7 | ac_output=confout.$$ 8 | rm -f $ac_temp $ac_output 9 | cat >>$ac_temp <<\_ACEOF 10 | (defun ac-temp-func (&optional argv) 11 | $2 12 | (princ "\n") ; make sure the output has trailing newline. 13 | ) 14 | _ACEOF 15 | $EMACS -batch -q -l $ac_temp -eval "(ac-temp-func $3)" | sed -e '/^ *$/d' > $ac_output 16 | $1=`cat $ac_output` 17 | rm -f $ac_temp $ac_output; }]) 18 | -------------------------------------------------------------------------------- /icons/plugged.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char *plugged[] = { 3 | "32 12 8 1", 4 | " c None", 5 | ". c #a6caf0", 6 | "# c #8fa5cf", 7 | "a c #717171", 8 | "b c #5d5d97", 9 | "c c #8488ca", 10 | "d c #9f9f9f", 11 | "e c #7f8080", 12 | " ... ", 13 | " .ccb.... ", 14 | " accb####. ", 15 | " .accb#####.. ", 16 | " eeeeeeeeaccb#####.eeeeeeee ", 17 | " dddddddcaccb#####.dedddddd ", 18 | " dddddddcaccb#####.dedddddd ", 19 | " eeeeeeeeaccb#####.eeeeeeee ", 20 | " aaccb####aaa ", 21 | " accbaaaaa ", 22 | " aaaaaaaa ", 23 | " aaa " 24 | }; 25 | -------------------------------------------------------------------------------- /doc/Makefile.am: -------------------------------------------------------------------------------- 1 | info_TEXINFOS = navi2ch.texi 2 | EXTRA_DIST = Makefile.pmake batch-texi2info.el 3 | CLEANFILES = navi2ch.pdf navi2ch.html 4 | 5 | .texi.info: 6 | rm -f $(@)* 7 | $(EMACS) -q -batch -l $(srcdir)/batch-texi2info.el \ 8 | -f batch-texi2info $< 9 | 10 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 11 | cd $(top_builddir) && \ 12 | CONFIG_HEADERS= CONFIG_LINKS= \ 13 | CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status 14 | 15 | # create PDF file 16 | pdf: navi2ch.pdf 17 | .texi.dvi: 18 | TEX=ptex texi2dvi $< 19 | .dvi.pdf: 20 | rm -f $@ && dvipdfm $< 21 | 22 | # create HTML file 23 | html: navi2ch.html 24 | .texi.html: 25 | $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \ 26 | --html --no-split -o $@ $< 27 | -------------------------------------------------------------------------------- /bcomp.el.in: -------------------------------------------------------------------------------- 1 | ;;; -*- Emacs-Lisp -*- 2 | (require 'cl) 3 | 4 | (when (featurep 'xemacs) 5 | (setq log-warning-minimum-level 'info) 6 | (setenv "XEMACSDEBUG" nil)) 7 | 8 | (setq bcomp-files 9 | '( 10 | @lisp_LISP@ 11 | )) 12 | 13 | (let* ((dir (expand-file-name default-directory)) 14 | (load-path (cons dir load-path)) 15 | file) 16 | (message "deleting old .elc files...") 17 | (dolist (elt bcomp-files) 18 | (setq file (concat dir elt "c")) 19 | (when (file-exists-p file) 20 | (delete-file file))) 21 | (message "compiling...") 22 | (dolist (elt bcomp-files) 23 | (setq file (concat dir elt)) 24 | (let ((coding-system-for-read 'iso-2022-7bit)) 25 | (byte-compile-file file t))) 26 | (message "done")) 27 | -------------------------------------------------------------------------------- /icons/COPYING: -------------------------------------------------------------------------------- 1 | Copyright (C) 1998-2001 Yuuichi Teranishi 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; either version 2, or (at your option) 6 | any later version. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with GNU Emacs; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 59 Temple Place - Suite 330, 16 | Boston, MA 02111-1307, USA. 17 | -------------------------------------------------------------------------------- /icons/unplugged.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char *unplugged_xpm[] = { 3 | "32 16 8 1", 4 | " c None", 5 | ". c #f0caa6", 6 | "# c #cfa58f", 7 | "a c #717171", 8 | "b c #975d5d", 9 | "c c #ca8884", 10 | "d c tomato", 11 | "e c #80807f", 12 | " ", 13 | " ", 14 | " .. . ", 15 | " .cc b.... ", 16 | " accccc b####. ", 17 | " .accccc b#####.. ", 18 | " eeeeaccccc b#####.eeeee ", 19 | " dddcacc b#####.deddd ", 20 | " dddcacc b#####.deddd ", 21 | " eeeeaccccc b#####.eeeee ", 22 | " aaccccc b####aaa ", 23 | " accccc baaaaa ", 24 | " aaa aaaaa ", 25 | " aa a ", 26 | " ", 27 | " " 28 | }; 29 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | -*- mode: outline; coding: utf-8 -*- 2 | Copyright (C) 2000-2004 Navi2ch Project 3 | 4 | Navi2ch は、GNU Emacs、XEmacs、Meadow などの Emacsen で動作する、2ちゃ 5 | んねるナビゲータです。 6 | 7 | インストール方法、使い方についてはマニュアルをお読みください。 8 | 9 | マニュアルを読むには Emacs から C-u M-x info RET doc/navi2ch.info とす 10 | るか、ウェブブブラウザから http://navi2ch.sourceforge.net/ を開いてく 11 | ださい。 12 | 13 | * ウェブサイト 14 | Navi2ch Project Home Page 15 | UNIX@2ch掲示板 16 | 17 | * ファイル構成 18 | ** トップディレクトリ 19 | elisp ファイル、いくつかのドキュメントが入っています。 20 | ** contrib 21 | Navi2ch といっしょに使うと便利なファイルが入っています。 22 | あまり熱心にメンテナンスされてないので注意。 23 | ** doc 24 | マニュアルが入っています。 25 | ** icons 26 | イメージファイルが入っています。 27 | 28 | * 注意 29 | Windows などでは環境変数 TZ を JST-9 とかにしといた方がいいです。 30 | GNU Emacs 21 以降、XEmacs 21.4 以降でないと動きません。 31 | XEmacs では mail-lib パッケージをインストールしてください。 32 | 33 | * 謝辞 34 | 最初に perl 版を作った hc2ivan さんに感謝です。 35 | Navi2ch は APEL、Wanderlust の一部を使用しています。作者の方々に感謝。 36 | 37 | $Id$ 38 | -------------------------------------------------------------------------------- /navi2ch-config.el.in: -------------------------------------------------------------------------------- 1 | ;;; -*- Emacs-Lisp -*- 2 | ;;; @configure_input@ 3 | ;;; navi2ch-config.el --- configure variables 4 | 5 | ;; Copyright (C) 2006 Navi2ch Project 6 | 7 | ;; Author: Nanashi San 8 | ;; Keywords: network, 2ch 9 | 10 | ;; This file is free software; you can redistribute it and/or modify 11 | ;; it under the terms of the GNU General Public License as published by 12 | ;; the Free Software Foundation; either version 2, or (at your option) 13 | ;; any later version. 14 | 15 | ;; This file is distributed in the hope that it will be useful, 16 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | ;; GNU General Public License for more details. 19 | 20 | ;; You should have received a copy of the GNU General Public License 21 | ;; along with GNU Emacs; see the file COPYING. If not, write to 22 | ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 23 | ;; Boston, MA 02111-1307, USA. 24 | 25 | ;;; Commentary: 26 | 27 | ;; 28 | 29 | ;;; Code: 30 | (provide 'navi2ch-config) 31 | (defconst navi2ch-config-ident 32 | "$Id$") 33 | 34 | (defconst navi2ch-config-icondir 35 | "@icondir@") 36 | ;;; navi2ch-config.el ends here 37 | -------------------------------------------------------------------------------- /contrib/README: -------------------------------------------------------------------------------- 1 | -*- mode: outline; coding: iso-2022-7bit -*- 2 | Copyright (C) 2000-2003 Navi2ch Project 3 | 4 | $B$3$N%G%#%l%/%H%j$K$O(B Navi2ch $B$H$$$C$7$g$K;H$&$HJXMx$J%U%!%$%k$,F~$C$F(B 5 | $B$$$^$9!#>\$7$$;H$$J}$O!"3F%U%!%$%k$N@hF,$N%3%a%s%H$rFI$s$G$M!#(B 6 | 7 | * navi2ch-logo.el 8 | $B%l%90lMw$N@hF,$K$=$NHD$N%m%4$rE=$j$D$1$k!#(B 9 | Emacs 21 $B@lMQ!#(B 10 | 11 | * gikope.el 12 | AA $B$r%-%k%j%s%0$K%3%T!l9g$O(B Commentary $B$K$"$k@_Dj$r$7$F$"$2$F$M!#(B 26 | 27 | * navi2ch-pizaunix.el 28 | http://piza.2ch.net/log/unix/0008251/ $B$N(B 29 | Unix $BHD2a5n%m%0AR8K$r8+$k$?$a$N(B multibbs module $B$G$9!#(B 30 | 31 | * navi2ch-spamfilter.el 32 | http://www.geocities.co.jp/SiliconValley-PaloAlto/7043/#spamfilter.el 33 | $B$r(B Navi2ch $B$+$iMxMQ$7$^$9!#(B 34 | 35 | $Id$ 36 | -------------------------------------------------------------------------------- /bcomp.el: -------------------------------------------------------------------------------- 1 | ;;; -*- Emacs-Lisp -*- 2 | (require 'cl) 3 | 4 | (when (featurep 'xemacs) 5 | (setq log-warning-minimum-level 'info) 6 | (setenv "XEMACSDEBUG" nil)) 7 | 8 | (setq bcomp-files 9 | '( 10 | "navi2ch-version.el" "navi2ch-vars.el" "navi2ch-face.el" "navi2ch-util.el" "navi2ch-net.el" "navi2ch-list.el" "navi2ch-article.el" "navi2ch-popup-article.el" "navi2ch-board-misc.el" "navi2ch-board.el" "navi2ch-articles.el" "navi2ch-bookmark.el" "navi2ch-history.el" "navi2ch-search.el" "navi2ch-message.el" "navi2ch.el" "navi2ch-head.el" "navi2ch-mona.el" "navi2ch-e21.el" "navi2ch-xmas.el" "navi2ch-splash.el" "navi2ch-directory.el" "navi2ch-be2ch.el" "navi2ch-multibbs.el" "navi2ch-jbbs-net.el" "navi2ch-jbbs-shitaraba.el" "navi2ch-machibbs.el" "navi2ch-futaba.el" "navi2ch-megabbs.el" "navi2ch-http-date.el" "navi2ch-localfile.el" "navi2ch-oyster.el" "navi2ch-auto-modify.el" "navi2ch-p2.el" "navi2ch-thumbnail.el" 11 | )) 12 | 13 | (let* ((dir (expand-file-name default-directory)) 14 | (load-path (cons dir load-path)) 15 | file) 16 | (message "deleting old .elc files...") 17 | (dolist (elt bcomp-files) 18 | (setq file (concat dir elt "c")) 19 | (when (file-exists-p file) 20 | (delete-file file))) 21 | (message "compiling...") 22 | (dolist (elt bcomp-files) 23 | (setq file (concat dir elt)) 24 | (let ((coding-system-for-read 'iso-2022-7bit)) 25 | (byte-compile-file file t))) 26 | (message "done")) 27 | -------------------------------------------------------------------------------- /navi2ch-futaba.el: -------------------------------------------------------------------------------- 1 | ;;; navi2ch-futaba.el --- View futaba module for Navi2ch. -*- coding: iso-2022-7bit; -*- 2 | 3 | ;; Copyright (C) 2002, 2003, 2004 by Navi2ch Project 4 | 5 | ;; Author: 6 | 7 | ;; Keywords: 2ch, network 8 | 9 | ;; This file is free software; you can redistribute it and/or modify 10 | ;; it under the terms of the GNU General Public License as published by 11 | ;; the Free Software Foundation; either version 2, or (at your option) 12 | ;; any later version. 13 | 14 | ;; This file is distributed in the hope that it will be useful, 15 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | ;; GNU General Public License for more details. 18 | 19 | ;; You should have received a copy of the GNU General Public License 20 | ;; along with GNU Emacs; see the file COPYING. If not, write to 21 | ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 22 | ;; Boston, MA 02111-1307, USA. 23 | 24 | ;;; Commentary: 25 | 26 | ;; 27 | 28 | ;;; Code: 29 | (provide 'navi2ch-futaba) 30 | 31 | (eval-when-compile (require 'cl)) 32 | (require 'navi2ch-util) 33 | (require 'navi2ch-multibbs) 34 | 35 | (defvar navi2ch-futaba-func-alist 36 | '((bbs-p . navi2ch-futaba-p) 37 | (send-success-p . navi2ch-futaba-send-message-success-p) 38 | )) 39 | 40 | (defvar navi2ch-futaba-variable-alist 41 | (list (cons 'coding-system navi2ch-coding-system))) 42 | 43 | (navi2ch-multibbs-regist 'futaba 44 | navi2ch-futaba-func-alist 45 | navi2ch-futaba-variable-alist) 46 | 47 | ;;------------- 48 | 49 | (defun navi2ch-futaba-p (uri) 50 | "URI $B$,$U$?$P$A$c$s$M$k$J$i$P(B non-nil$B$rJV$9!#(B" 51 | (string-match "http://www.2chan.net/" uri)) 52 | 53 | (defun navi2ch-futaba-send-message-success-p (proc) 54 | (string= "302" (navi2ch-net-get-status proc))) 55 | 56 | 57 | (provide 'navi2ch-futaba) 58 | 59 | ;;; navi2ch-futaba.el ends here 60 | -------------------------------------------------------------------------------- /contrib/navi2ch-migemo.el: -------------------------------------------------------------------------------- 1 | ;;; navi2ch-migemo.el --- migemo support for Navi2ch 2 | 3 | ;; Copyright (C) 2002 by Navi2ch Project 4 | 5 | ;; Author: Nanashi San 6 | ;; Keywords: 2ch, network, matching 7 | 8 | ;; This file is free software; you can redistribute it and/or modify 9 | ;; it under the terms of the GNU General Public License as published by 10 | ;; the Free Software Foundation; either version 2, or (at your option) 11 | ;; any later version. 12 | 13 | ;; This file is distributed in the hope that it will be useful, 14 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | ;; GNU General Public License for more details. 17 | 18 | ;; You should have received a copy of the GNU General Public License 19 | ;; along with GNU Emacs; see the file COPYING. If not, write to 20 | ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 21 | ;; Boston, MA 02111-1307, USA. 22 | 23 | ;;; Commentary: 24 | 25 | ;; To use this module, put following code into your `~/.navi2ch/init.el': 26 | ;; (require 'navi2ch-migemo) 27 | 28 | ;;; Code: 29 | (provide 'navi2ch-migemo) 30 | 31 | ;; migemo $B$,$J$/$F$b%3%s%Q%$%k$G$-$k$h$&$K!#(B 32 | (eval '(require 'migemo)) 33 | 34 | (require 'navi2ch-search) 35 | 36 | (defvar navi2ch-migemo-enable t 37 | "*$B8!:w%Q%?!<%s$K(Bmigemo$B$rE,MQ$9$k$+$I$&$+!#(B") 38 | 39 | (defadvice navi2ch-search-board-subject-regexp 40 | (before navi2ch-migemo-search-board-subject-regexp activate) 41 | "$B8!:w%Q%?!<%s$K(Bmigemo$B$rE,MQ$9$k!#(B" 42 | (if navi2ch-migemo-enable 43 | (ad-set-arg 1 (migemo-get-pattern (ad-get-arg 1))))) 44 | 45 | (defadvice navi2ch-search-article-regexp 46 | (before navi2ch-migemo-search-article-regexp activate) 47 | "$B8!:w%Q%?!<%s$K(Bmigemo$B$rE,MQ$9$k!#(B" 48 | (if navi2ch-migemo-enable 49 | (ad-set-arg 1 (migemo-get-pattern (ad-get-arg 1))))) 50 | 51 | (defun navi2ch-migemo-toggle-enable () 52 | (setq navi2ch-migemo-enable (not navi2ch-migemo-enable))) 53 | 54 | ;;; navi2ch-migemo.el ends here 55 | -------------------------------------------------------------------------------- /contrib/navi2ch-track-mouse.el: -------------------------------------------------------------------------------- 1 | ;;; navi2ch-track-mouse.el --- Emulate help-echo functionality on Emacs 20 2 | 3 | ;; Copyright (C) 2002 by Navi2ch Project 4 | 5 | ;; Author: Taiki SUGAWARA 6 | ;; Adapted-By: Nanashi San 7 | ;; Keywords: emulations, convenience 8 | 9 | ;; This file is free software; you can redistribute it and/or modify 10 | ;; it under the terms of the GNU General Public License as published by 11 | ;; the Free Software Foundation; either version 2, or (at your option) 12 | ;; any later version. 13 | 14 | ;; This file is distributed in the hope that it will be useful, 15 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | ;; GNU General Public License for more details. 18 | 19 | ;; You should have received a copy of the GNU General Public License 20 | ;; along with GNU Emacs; see the file COPYING. If not, write to 21 | ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 22 | ;; Boston, MA 02111-1307, USA. 23 | 24 | ;;; Commentary: 25 | 26 | ;; Emacs 20 $B$G$b!"(BEmacs 21 $B0J9_$G;H$($k(B help-echo $B%W%m%Q%F%#$rI=<($9$k!#(B 27 | ;; $B$G$b!"(Btrack-mouse $B$r(B t $B$K$9$k$s$G=E$$$+$b$h!#(B 28 | 29 | ;;; Code: 30 | (defun navi2ch-track-mouse (event) 31 | "Emulate help-echo functionality on Emacs 20." 32 | (interactive "e") 33 | (save-excursion 34 | (save-window-excursion 35 | (condition-case nil 36 | (progn 37 | (mouse-set-point event) 38 | (let ((help-echo (get-text-property (point) 'help-echo)) 39 | (message-log-max nil)) 40 | (cond ((functionp help-echo) 41 | (princ (funcall help-echo 42 | (selected-window) (current-buffer) 43 | (point)) 44 | t)) 45 | ((stringp help-echo) 46 | (princ help-echo))))))))) 47 | 48 | (when (and (not (featurep 'xemacs)) 49 | (= emacs-major-version 20)) 50 | (define-key global-map [mouse-movement] 'navi2ch-track-mouse) 51 | (setq track-mouse t)) 52 | 53 | (provide 'navi2ch-track-mouse) 54 | ;;; navi2ch-track-mouse.el ends here 55 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | AUTOMAKE_OPTIONS = 1.8 2 | lisp_LISP = navi2ch-version.el \ 3 | navi2ch-vars.el navi2ch-face.el navi2ch-util.el \ 4 | navi2ch-net.el navi2ch-list.el navi2ch-article.el \ 5 | navi2ch-popup-article.el navi2ch-board-misc.el \ 6 | navi2ch-board.el navi2ch-articles.el navi2ch-bookmark.el \ 7 | navi2ch-history.el navi2ch-search.el navi2ch-message.el \ 8 | navi2ch.el \ 9 | navi2ch-head.el navi2ch-mona.el navi2ch-e21.el navi2ch-xmas.el \ 10 | navi2ch-splash.el navi2ch-directory.el \ 11 | navi2ch-be2ch.el navi2ch-multibbs.el \ 12 | navi2ch-jbbs-net.el navi2ch-jbbs-shitaraba.el navi2ch-machibbs.el \ 13 | navi2ch-futaba.el navi2ch-megabbs.el \ 14 | navi2ch-http-date.el navi2ch-localfile.el navi2ch-oyster.el \ 15 | navi2ch-auto-modify.el navi2ch-p2.el navi2ch-thumbnail.el 16 | lisp_DATA = navi2ch-config.el 17 | 18 | EXTRA_DIST = Makefile.old bcomp.el $(lisp_LISP) \ 19 | bcomp.el.in navi2ch-version.el.in ChangeLog.1 ChangeLog.2 20 | BUILT_SOURCES = $(srcdir)/navi2ch-version.el $(srcdir)/bcomp.el 21 | SUBDIRS = contrib doc icons test 22 | 23 | $(srcdir)/navi2ch-version.el: @MAINTAINER_MODE_TRUE@ $(srcdir)/navi2ch-version.el.in $(srcdir)/configure.in 24 | rm -f $@.tmp && \ 25 | sed -e 's/@\(VERSION\)@/$(VERSION)/' \ 26 | $(srcdir)/navi2ch-version.el.in > $@.tmp && \ 27 | mv $@.tmp $@ 28 | 29 | snap: 30 | rm -f $(srcdir)/navi2ch-version.el && \ 31 | $(MAKE) $(AM_MAKEFLAGS) VERSION=@VERSION@-`date +%y%m%d` dist elcdist && \ 32 | rm -f $(srcdir)/navi2ch-version.el && \ 33 | $(MAKE) $(AM_MAKEFLAGS) $(srcdir)/navi2ch-version.el 34 | 35 | elcdist: $(ELCFILES) 36 | rm -rf $(distdir) && \ 37 | mkdir $(distdir) && \ 38 | cp -p $(ELCFILES) $(distdir) && \ 39 | $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir)-elc.tar.gz && \ 40 | rm -rf $(distdir) 41 | 42 | $(srcdir)/bcomp.el: @MAINTAINER_MODE_TRUE@ $(srcdir)/bcomp.el.in $(srcdir)/Makefile.am 43 | rm -f $@ && \ 44 | list=`for file in $(lisp_LISP); do echo -n "\"$$file\" "; done` && \ 45 | sed -e "s/@\(lisp_LISP\)@/$$list/;" < $(srcdir)/bcomp.el.in > $@ || rm $@ 46 | 47 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 48 | cd $(top_builddir) && \ 49 | CONFIG_HEADERS= CONFIG_LINKS= \ 50 | CONFIG_FILES=$@ $(SHELL) ./config.status 51 | 52 | Makefiles: $(top_builddir)/config.status 53 | $(SHELL) $(top_builddir)/config.status 54 | 55 | update: 56 | ( cd $(srcdir); $(CVS) update -P -d ) && \ 57 | $(MAKE) $(AM_MAKEFLAGS) Makefiles 58 | 59 | -------------------------------------------------------------------------------- /navi2ch-xmas.el: -------------------------------------------------------------------------------- 1 | ;;; navi2ch-xmas.el --- XEmacs module for navi2ch -*- coding: iso-2022-7bit; -*- 2 | 3 | ;; Copyright (C) 2003 by Navi2ch Project 4 | 5 | ;; Author: SAITO Takuya 6 | ;; Keywords: network, 2ch 7 | 8 | ;; This file is free software; you can redistribute it and/or modify 9 | ;; it under the terms of the GNU General Public License as published by 10 | ;; the Free Software Foundation; either version 2, or (at your option) 11 | ;; any later version. 12 | 13 | ;; This file is distributed in the hope that it will be useful, 14 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | ;; GNU General Public License for more details. 17 | 18 | ;; You should have received a copy of the GNU General Public License 19 | ;; along with GNU Emacs; see the file COPYING. If not, write to 20 | ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 21 | ;; Boston, MA 02111-1307, USA. 22 | 23 | ;;; Commentary: 24 | 25 | ;; 26 | 27 | ;;; Code: 28 | (provide 'navi2ch-xmas) 29 | (defconst navi2ch-xmas-ident 30 | "$Id$") 31 | (require 'navi2ch) 32 | 33 | (add-hook 'navi2ch-hook 'navi2ch-offline-init-icons) 34 | 35 | (eval-when-compile 36 | (navi2ch-defalias-maybe 'make-extent 'ignore) 37 | (navi2ch-defalias-maybe 'make-glyph 'ignore) 38 | (navi2ch-defalias-maybe 'make-modeline-command-wrapper 'ignore) 39 | (navi2ch-defalias-maybe 'set-extent-keymap 'ignore) 40 | (navi2ch-defalias-maybe 'set-extent-property 'ignore) 41 | (navi2ch-defalias-maybe 'set-glyph-image 'ignore)) 42 | 43 | (defun navi2ch-offline-init-icons () 44 | (let ((extent (make-extent nil nil)) 45 | (keymap (make-sparse-keymap)) 46 | (online (make-glyph 47 | (vector 'string :data navi2ch-online-indicator))) 48 | (offline (make-glyph 49 | (vector 'string :data navi2ch-offline-indicator)))) 50 | (define-key keymap 'button2 51 | (make-modeline-command-wrapper 'navi2ch-toggle-offline)) 52 | (set-extent-keymap extent keymap) 53 | (set-extent-property extent 'help-echo "button2 toggles offline mode") 54 | (set-glyph-image online 55 | (vector 'xpm 56 | :file (expand-file-name navi2ch-online-icon 57 | navi2ch-icon-directory))) 58 | (set-glyph-image offline 59 | (vector 'xpm 60 | :file (expand-file-name navi2ch-offline-icon 61 | navi2ch-icon-directory))) 62 | (setq navi2ch-modeline-online (cons extent online) 63 | navi2ch-modeline-offline (cons extent offline)))) 64 | 65 | ;;; navi2ch-xmas.el ends here 66 | -------------------------------------------------------------------------------- /contrib/navi2ch-pizaunix.el: -------------------------------------------------------------------------------- 1 | ;;; navi2ch-pizaunix.el --- View old Unix board module for Navi2ch. 2 | 3 | ;; Copyright (C) 2002 by Navi2ch Project 4 | 5 | ;; Author: Navi2ch Project 6 | ;; Keywords: 2ch, network 7 | 8 | ;; This file is free software; you can redistribute it and/or modify 9 | ;; it under the terms of the GNU General Public License as published by 10 | ;; the Free Software Foundation; either version 2, or (at your option) 11 | ;; any later version. 12 | 13 | ;; This file is distributed in the hope that it will be useful, 14 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | ;; GNU General Public License for more details. 17 | 18 | ;; You should have received a copy of the GNU General Public License 19 | ;; along with GNU Emacs; see the file COPYING. If not, write to 20 | ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 21 | ;; Boston, MA 02111-1307, USA. 22 | 23 | ;;; Commentary: 24 | 25 | ;; http://piza.2ch.net/log/unix/0008251/ $B$N(B 26 | ;; Unix $BHD2a5n%m%0AR8K$r8+$k$?$a$N(B multibbs module $B$G$9!#(B 27 | ;; http://pc.2ch.net/test/read.cgi/unix/972851555/ $B$b;2>H!#(B 28 | 29 | ;;; Code: 30 | (provide 'navi2ch-pizaunix) 31 | (defconst navi2ch-pizaunix-ident 32 | "$Id$") 33 | 34 | (require 'navi2ch-util) 35 | (require 'navi2ch-multibbs) 36 | 37 | (defvar navi2ch-pizaunix-func-alist 38 | '((bbs-p . navi2ch-pizaunix-p) 39 | (article-to-url . navi2ch-pizaunix-article-to-url) 40 | (article-update . navi2ch-pizaunix-article-update))) 41 | 42 | (defvar navi2ch-pizaunix-variable-alist 43 | '((coding-system . shift_jis))) 44 | 45 | (navi2ch-multibbs-regist 'pizaunix 46 | navi2ch-pizaunix-func-alist 47 | navi2ch-pizaunix-variable-alist) 48 | 49 | ;;------------- 50 | 51 | (defun navi2ch-pizaunix-p (uri) 52 | "URI $B$,(B pizaunix $B$J$i(B non-nil$B$rJV$9!#(B" 53 | (string-match "http://piza.2ch.net/log/unix/0008251/" uri)) 54 | 55 | (defun navi2ch-pizaunix-article-to-url 56 | (board article &optional start end nofirst) 57 | "BOARD, ARTICLE $B$+$i(B url $B$KJQ49!#(B 58 | START, END, NOFIRST $B$GHO0O$r;XDj$9$k(B" 59 | (concat "http://piza.2ch.net/log/unix/0008251/" 60 | (cdr (assq 'artid article)) 61 | ".html")) 62 | 63 | (defun navi2ch-pizaunix-article-update (board article start) 64 | "BOARD, ARTICLE $B$KBP1~$9$k%U%!%$%k$r99?7$9$k!#(B" 65 | (let ((file (navi2ch-article-get-file-name board article)) 66 | (url (concat "http://piza.2ch.net/log/unix/0008251/" 67 | (cdr (assq 'artid article)) 68 | ".dat"))) 69 | (list (navi2ch-net-update-file url file) 'kako))) 70 | 71 | ;;; navi2ch-pizaunix.el ends here 72 | -------------------------------------------------------------------------------- /configure.in: -------------------------------------------------------------------------------- 1 | AC_INIT(navi2ch.el) 2 | AM_INIT_AUTOMAKE(navi2ch, 2.0.0-DEV) 3 | AM_MAINTAINER_MODE 4 | 5 | AC_PREREQ(2.53) 6 | 7 | AM_PATH_LISPDIR 8 | 9 | AC_MSG_CHECKING([detecting your emacs type]) 10 | AC_EMACS_LISP(emacstype, [dnl 11 | (princ (cond ((featurep 'xemacs) 'xemacs) 12 | ((>= emacs-major-version 21) 'emacs21) 13 | ((= emacs-major-version 20) 'emacs20) 14 | (t 'UNKNOWN)))]) 15 | AC_MSG_RESULT([$emacstype]) 16 | 17 | if test -z "$emacstype" || test "$emacstype" = UNKNOWN; then 18 | AC_MSG_ERROR(this package does not work on your emacs) 19 | fi 20 | 21 | # detect packagedir 22 | AC_ARG_WITH(packagedir, 23 | [ --with-packagedir[[=DIR]] Use package directory 24 | (With XEmacs, this option also sets 25 | icondir, lispdir, infodir, etc...)], 26 | [ AC_MSG_CHECKING([where package files should go]) 27 | test "$emacstype" != xemacs && AC_MSG_ERROR(packagedir only works with XEmacs) 28 | case "$withval" in 29 | yes) AC_EMACS_LISP(packagedir,[ 30 | (let ((prefix argv) 31 | (default data-directory)) 32 | (princ 33 | (if (and prefix 34 | (not (string= prefix "NONE")) 35 | (string-match "/\\(\\(?:lib\\|share\\)/xemacs[[^/]]*/.*$\\)" default)) 36 | (expand-file-name "site-packages" 37 | (expand-file-name (match-string 1 default) 38 | prefix)) 39 | (expand-file-name "../site-packages" default))))], 40 | \"${prefix}\") 41 | ;; 42 | no) unset packagedir ;; 43 | *) packagedir="$withval" ;; 44 | esac 45 | AC_MSG_RESULT([$packagedir])]) 46 | 47 | AC_SUBST(packagedir) 48 | 49 | if test "$emacstype" = xemacs && test -n "$packagedir"; then 50 | icondir='${packagedir}/etc/navi2ch' 51 | lispdir='${packagedir}/lisp/navi2ch' 52 | infodir='${packagedir}/info' 53 | fi 54 | 55 | AC_ARG_WITH(icondir, 56 | [ --with-icondir=DIR Override the default icons directory], 57 | [ icondir="$withval" 58 | AC_MSG_CHECKING([where icon files should go]) 59 | AC_MSG_RESULT([$icondir])], 60 | [ 61 | if test -z "${icondir}"; then 62 | AC_CACHE_CHECK([where icon files should go], [_cv_icondir], [dnl 63 | AC_EMACS_LISP(_cv_icondir,[ 64 | (let ((prefix argv) 65 | (default data-directory)) 66 | (princ (expand-file-name "navi2ch/icons" 67 | (if (and prefix 68 | (not (string= prefix "NONE")) 69 | (string-match "/\\(\\(?:lib\\|share\\)/x?emacs[[^/]]*/.*$\\)" default)) 70 | (expand-file-name (match-string 1 default) 71 | prefix) 72 | default))))], 73 | \"${prefix}\") 74 | if test -z "$_cv_icondir"; then 75 | _cv_icondir='${datadir}/pixmaps/navi2ch' 76 | fi 77 | ]) 78 | icondir="$_cv_icondir" 79 | fi 80 | ]) 81 | 82 | AC_SUBST(icondir) 83 | 84 | AC_OUTPUT([Makefile contrib/Makefile doc/Makefile icons/Makefile test/Makefile 85 | navi2ch-config.el]) 86 | -------------------------------------------------------------------------------- /doc/releng.txt: -------------------------------------------------------------------------------- 1 | -*- mode: outline; coding: iso-2022-7bit -*- 2 | $Id$ 3 | 4 | $B%j%j!<%9%(%s%8%K%"%j%s%0$K$D$$$F(B 5 | 6 | * $B;H$C$F$$$kF;6q(B 7 | GNU Automake 1.9.6 8 | GNU Autoconf 2.62 9 | GNU Emacs 23.0.60 10 | 11 | * $B:n6HMQ%G%#%l%/%H%j(B 12 | configure.in $B$NJQ99$rH<$&$N$G!":n6HMQ%G%#%l%/%H%j$G$O(B 13 | % ./configure --enable-maintainer-mode 14 | $B$H$7$F$*$/$3$H!#(B 15 | 16 | * $B%j%j!<%9F|;~$r@k8@$9$k(B 17 | $BE,Ev$K7h$a$k!#%j%j!<%9$N0lF|A0$/$i$$$+$i(B commit $B6X;_$K$9$k!#(B 18 | (TBD: freeze $B$7$J$$$G%j%j!<%9MQ$K%V%i%s%A$r@Z$k$N$b$$$$$+$b!#(B) 19 | $BA02s$N%j%j!<%9$+$i$N(B ChangeLog $B$r$J$,$a$D$D!"(BNEWS $B$r99?7$9$k!#(B 20 | 21 | * $B&BHG$N%j%j!<%9(B 22 | configure.in $B$N(B AM_INIT_AUTOMAKE $B$r(B x.y.z-BETA $B$KJQ$($F(B 23 | % aclocal && autoconf && automake && make Makefiles && make dist elcdist 24 | $B$9$k!#(Btar $B6L$r(B http://navi2ch.sf.net/beta/ $B$KCV$$$F(B 2ch $B$N%9%l$G0FFb!#(B 25 | (.elc $B$N(B tar $B6L$K$O:n@.$7$?%[%9%HL>!&%f!<%6L>$,Kd$a9~$^$l$k$N$GCm0U!#(B 26 | $B5$$K$J$k$J$i(B compile farm $B$G:n6H$9$k$H$h$$!#(B 27 | https://sourceforge.net/docman/display_doc.php?docid=762&group_id=1 28 | shell server $B>e$G$N:n6H$O$J$k$Y$/Hr$1$k!#(B 29 | shell server $B>e$G(B tar $B6L$r:n$k$HCf$N%U%!%$%k$N(B UID $B$,(B 65536 $B$rD6$($F$7$^$$!"(B 30 | $B4D6-$K$h$C$F$OE83+;~$K7Y9p$,=P$F$7$^$&$?$a!#(B) 31 | 32 | * $B%j%j!<%9HG:n@.(B 33 | configure.in $B$N(B AM_INIT_AUTOMAKE $B$r(B x.y.z $B$KJQ$($F(B ChangeLog $B$r5-:\!"(B 34 | % aclocal && autoconf && automake && make Makefiles && make dist elcdist 35 | $B$9$k!#(B($B$3$l$G(B configure $B$d(B navi2ch-version.el $B$J$I$,99?7$5$l$k!#(B) 36 | $B$&$^$/$$$C$?$i(B 37 | % cvs commit -m 'bump version to x.y.z' 38 | % cvs tag navi2ch-x_y_z 39 | $B$G%j%j!<%985$N=`Hw$r$9$k!#(B 40 | commit $BK:$lEy$N3NG'$N$?$a!"JL%G%#%l%/%H%j$G(B cvs export $B$7$F(B 41 | % cd navi2ch-x.y.z && ./configure && make dist elcdist 42 | $B$G(B tar $B6L$r:n$k!#$^$?$^$?$h$=$N%G%#%l%/%H%j$KE83+$7$FG[I[J*$r3NG'!"(B 43 | $B$h$5$2$J$i(B SourceForge $B$N(B File Release $B$KCV$/!#(B 44 | ($BCV$-J}$O0J2<$N(B URL $B$+$i%X%k%W$r8+$J$,$i!#(B 45 | https://sourceforge.net/project/admin/editpackages.php?group_id=39552 ) 46 | 47 | * $B%j%j!<%9$N%"%J%&%s%9(B 48 | 2ch $B$N%9%l!"(Bhttp://navi2ch.sf.net/$B!"(B 49 | https://sourceforge.net/news/?group_id=39552 $B$"$?$j$G%"%J%&%s%9$r$9$k!#(B 50 | 51 | * $B%P!<%8%g%s$r3+H/HG$KJQ99(B 52 | configure.in $B$N(B AM_INIT_AUTOMAKE $B$r(B x.y.z-DEV $B$KJQ$($F(B ChangeLog $B$r5-:\!"(B 53 | % aclocal && autoconf && automake && make Makefiles && make 54 | $B$7$F(B ($B:G8e$N(B make $B$rK:$l$k$H(B BUILT_SOURCES $B$,99?7$5$l$J$$(B) 55 | % cvs commit -m 'bump version to x.y.z-DEV' 56 | $B$G(B commit $B$9$k!#(B 57 | -------------------------------------------------------------------------------- /elisp-comp: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright (C) 1995, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. 3 | 4 | scriptversion=2008-05-31.01 5 | 6 | # Franc,ois Pinard , 1995. 7 | # 8 | # This program is free software; you can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation; either version 2, or (at your option) 11 | # any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program; if not, write to the Free Software 20 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | 22 | # As a special exception to the GNU General Public License, if you 23 | # distribute this file as part of a program that contains a 24 | # configuration script generated by Autoconf, you may include it under 25 | # the same distribution terms that you use for the rest of that program. 26 | 27 | # This file is maintained in Automake, please report 28 | # bugs to or send patches to 29 | # . 30 | 31 | case $1 in 32 | '') 33 | echo "$0: No files. Try \`$0 --help' for more information." 1>&2 34 | exit 1; 35 | ;; 36 | -h | --h*) 37 | cat <<\EOF 38 | Usage: elisp-comp [--help] [--version] FILES... 39 | 40 | This script byte-compiles all `.el' files listed as FILES using GNU 41 | Emacs, and put the resulting `.elc' files into the current directory, 42 | so disregarding the original directories used in `.el' arguments. 43 | 44 | This script manages in such a way that all Emacs LISP files to 45 | be compiled are made visible between themselves, in the event 46 | they require or load-library one another. 47 | 48 | Report bugs to . 49 | EOF 50 | exit $? 51 | ;; 52 | -v | --v*) 53 | echo "elisp-comp $scriptversion" 54 | exit $? 55 | ;; 56 | esac 57 | 58 | if test -z "$EMACS" || test "$EMACS" = "t"; then 59 | # Value of "t" means we are running in a shell under Emacs. 60 | # Just assume Emacs is called "emacs". 61 | EMACS=emacs 62 | fi 63 | 64 | tempdir=elc.$$ 65 | 66 | # Cleanup the temporary directory on exit. 67 | trap 'ret=$?; rm -rf "$tempdir" && exit $ret' 0 68 | trap '(exit $?); exit' 1 2 13 15 69 | 70 | mkdir $tempdir 71 | cp "$@" $tempdir 72 | 73 | ( 74 | cd $tempdir 75 | echo '(setq load-path (cons "." load-path))' > script 76 | # $EMACS -batch -q -l script -f batch-byte-compile *.el || exit $? 77 | $EMACS -batch -q -l script -l ../bcomp.el || exit $? 78 | mv *.elc .. 79 | ) || exit $? 80 | 81 | (exit 0); exit 0 82 | 83 | # Local Variables: 84 | # mode: shell-script 85 | # sh-indentation: 2 86 | # eval: (add-hook 'write-file-hooks 'time-stamp) 87 | # time-stamp-start: "scriptversion=" 88 | # time-stamp-format: "%:y-%02m-%02d.%02H" 89 | # time-stamp-end: "$" 90 | # End: 91 | -------------------------------------------------------------------------------- /navi2ch-e21.el: -------------------------------------------------------------------------------- 1 | ;;; navi2ch-e21.el --- GNU Emacs 21 module for navi2ch -*- coding: iso-2022-7bit; -*- 2 | 3 | ;; Copyright (C) 2001, 2002, 2004 by Navi2ch Project 4 | ;; Copyright (C) 2000,2001 Katsumi Yamaoka 5 | ;; Copyright (C) 2000,2001 Yuuichi Teranishi 6 | 7 | ;; Author: UEYAMA Rui 8 | ;; Keywords: network, 2ch 9 | 10 | ;; This file is free software; you can redistribute it and/or modify 11 | ;; it under the terms of the GNU General Public License as published by 12 | ;; the Free Software Foundation; either version 2, or (at your option) 13 | ;; any later version. 14 | 15 | ;; This file is distributed in the hope that it will be useful, 16 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | ;; GNU General Public License for more details. 19 | 20 | ;; You should have received a copy of the GNU General Public License 21 | ;; along with GNU Emacs; see the file COPYING. If not, write to 22 | ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 23 | ;; Boston, MA 02111-1307, USA. 24 | 25 | ;;; Commentary: 26 | 27 | ;; 28 | 29 | ;;; Code: 30 | (provide 'navi2ch-e21) 31 | (defconst navi2ch-e21-ident 32 | "$Id$") 33 | (require 'navi2ch) 34 | 35 | ;;; $B0J2 6 | ;; Keywords: network, 2ch 7 | 8 | ;; This file is free software; you can redistribute it and/or modify 9 | ;; it under the terms of the GNU General Public License as published by 10 | ;; the Free Software Foundation; either version 2, or (at your option) 11 | ;; any later version. 12 | 13 | ;; This file is distributed in the hope that it will be useful, 14 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | ;; GNU General Public License for more details. 17 | 18 | ;; You should have received a copy of the GNU General Public License 19 | ;; along with GNU Emacs; see the file COPYING. If not, write to 20 | ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 21 | ;; Boston, MA 02111-1307, USA. 22 | 23 | ;;; Commentary: 24 | 25 | ;; 26 | 27 | ;;; Code: 28 | (provide 'navi2ch-be2ch) 29 | 30 | (eval-when-compile (require 'cl)) 31 | (require 'navi2ch-net) 32 | (require 'navi2ch-util) 33 | 34 | (defconst navi2ch-be2ch-ident 35 | "$Id$") 36 | (defconst navi2ch-be2ch-coding-system 'euc-jp) 37 | (defconst navi2ch-be2ch-cookie-names '("MDMD" "DMDM")) 38 | (defconst navi2ch-be2ch-cookie-domain '2ch.net) 39 | (defconst navi2ch-be2ch-cookie-path '/) 40 | 41 | (defvar navi2ch-be2ch-login-url "http://be.2ch.net/test/login.php") 42 | 43 | (defvar navi2ch-be2ch-mail-address nil) 44 | (defvar navi2ch-be2ch-password nil) 45 | 46 | (defvar navi2ch-be2ch-login-flag nil) 47 | 48 | (defun navi2ch-be2ch-login-p () 49 | (let ((cookies (navi2ch-net-match-cookies navi2ch-be2ch-login-url))) 50 | (setq navi2ch-be2ch-login-flag 51 | (null (memq nil 52 | (mapcar (lambda (name) (assoc name cookies)) 53 | navi2ch-be2ch-cookie-names)))))) 54 | 55 | (defun navi2ch-be2ch-login (mail password) 56 | (interactive 57 | (list 58 | (or navi2ch-be2ch-mail-address 59 | (read-string "mail address: ")) 60 | (or navi2ch-be2ch-password 61 | (read-passwd "password: ")))) 62 | (navi2ch-be2ch-logout t) 63 | (let ((proc (navi2ch-net-send-request 64 | navi2ch-be2ch-login-url 65 | "POST" 66 | (list 67 | (cons "Referer" navi2ch-be2ch-login-url) 68 | (cons "Content-Type" "application/x-www-form-urlencoded")) 69 | (navi2ch-net-get-param-string 70 | (list 71 | (cons "m" mail) 72 | (cons "p" password) 73 | (cons "submit" "$BEPO?(B")) 74 | navi2ch-be2ch-coding-system)))) 75 | (navi2ch-net-update-cookies navi2ch-be2ch-login-url 76 | proc 77 | navi2ch-be2ch-coding-system) 78 | (navi2ch-net-save-cookies) 79 | (when (navi2ch-be2ch-login-p) 80 | (message "Be@2ch $B$K%m%0%$%s$7$^$7$?!#(B")))) 81 | 82 | (defun navi2ch-be2ch-logout (&optional no-msg) 83 | (interactive) 84 | (dolist (name navi2ch-be2ch-cookie-names) 85 | (navi2ch-net-store-cookie (list name "" 0 0) 86 | navi2ch-be2ch-cookie-domain 87 | navi2ch-be2ch-cookie-path)) 88 | (navi2ch-net-save-cookies) 89 | (setq navi2ch-be2ch-login-flag nil) 90 | (unless no-msg 91 | (message "Be@2ch $B$+$i%m%0%"%&%H$7$^$7$?!#(B"))) 92 | 93 | (defun navi2ch-be2ch-toggle-login () 94 | "Be@2ch $B$X$N%m%0%$%s>uBV$r@Z$jBX$($k!#(B" 95 | (interactive) 96 | (if navi2ch-be2ch-login-flag 97 | (navi2ch-be2ch-logout) 98 | (call-interactively 'navi2ch-be2ch-login))) 99 | 100 | ;;; navi2ch-be2ch.el ends here 101 | -------------------------------------------------------------------------------- /mkinstalldirs: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # mkinstalldirs --- make directory hierarchy 3 | 4 | scriptversion=2005-06-29.22 5 | 6 | # Original author: Noah Friedman 7 | # Created: 1993-05-16 8 | # Public domain. 9 | # 10 | # This file is maintained in Automake, please report 11 | # bugs to or send patches to 12 | # . 13 | 14 | errstatus=0 15 | dirmode= 16 | 17 | usage="\ 18 | Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... 19 | 20 | Create each directory DIR (with mode MODE, if specified), including all 21 | leading file name components. 22 | 23 | Report bugs to ." 24 | 25 | # process command line arguments 26 | while test $# -gt 0 ; do 27 | case $1 in 28 | -h | --help | --h*) # -h for help 29 | echo "$usage" 30 | exit $? 31 | ;; 32 | -m) # -m PERM arg 33 | shift 34 | test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } 35 | dirmode=$1 36 | shift 37 | ;; 38 | --version) 39 | echo "$0 $scriptversion" 40 | exit $? 41 | ;; 42 | --) # stop option processing 43 | shift 44 | break 45 | ;; 46 | -*) # unknown option 47 | echo "$usage" 1>&2 48 | exit 1 49 | ;; 50 | *) # first non-opt arg 51 | break 52 | ;; 53 | esac 54 | done 55 | 56 | for file 57 | do 58 | if test -d "$file"; then 59 | shift 60 | else 61 | break 62 | fi 63 | done 64 | 65 | case $# in 66 | 0) exit 0 ;; 67 | esac 68 | 69 | # Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and 70 | # mkdir -p a/c at the same time, both will detect that a is missing, 71 | # one will create a, then the other will try to create a and die with 72 | # a "File exists" error. This is a problem when calling mkinstalldirs 73 | # from a parallel make. We use --version in the probe to restrict 74 | # ourselves to GNU mkdir, which is thread-safe. 75 | case $dirmode in 76 | '') 77 | if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then 78 | echo "mkdir -p -- $*" 79 | exec mkdir -p -- "$@" 80 | else 81 | # On NextStep and OpenStep, the `mkdir' command does not 82 | # recognize any option. It will interpret all options as 83 | # directories to create, and then abort because `.' already 84 | # exists. 85 | test -d ./-p && rmdir ./-p 86 | test -d ./--version && rmdir ./--version 87 | fi 88 | ;; 89 | *) 90 | if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && 91 | test ! -d ./--version; then 92 | echo "mkdir -m $dirmode -p -- $*" 93 | exec mkdir -m "$dirmode" -p -- "$@" 94 | else 95 | # Clean up after NextStep and OpenStep mkdir. 96 | for d in ./-m ./-p ./--version "./$dirmode"; 97 | do 98 | test -d $d && rmdir $d 99 | done 100 | fi 101 | ;; 102 | esac 103 | 104 | for file 105 | do 106 | case $file in 107 | /*) pathcomp=/ ;; 108 | *) pathcomp= ;; 109 | esac 110 | oIFS=$IFS 111 | IFS=/ 112 | set fnord $file 113 | shift 114 | IFS=$oIFS 115 | 116 | for d 117 | do 118 | test "x$d" = x && continue 119 | 120 | pathcomp=$pathcomp$d 121 | case $pathcomp in 122 | -*) pathcomp=./$pathcomp ;; 123 | esac 124 | 125 | if test ! -d "$pathcomp"; then 126 | echo "mkdir $pathcomp" 127 | 128 | mkdir "$pathcomp" || lasterr=$? 129 | 130 | if test ! -d "$pathcomp"; then 131 | errstatus=$lasterr 132 | else 133 | if test ! -z "$dirmode"; then 134 | echo "chmod $dirmode $pathcomp" 135 | lasterr= 136 | chmod "$dirmode" "$pathcomp" || lasterr=$? 137 | 138 | if test ! -z "$lasterr"; then 139 | errstatus=$lasterr 140 | fi 141 | fi 142 | fi 143 | fi 144 | 145 | pathcomp=$pathcomp/ 146 | done 147 | done 148 | 149 | exit $errstatus 150 | 151 | # Local Variables: 152 | # mode: shell-script 153 | # sh-indentation: 2 154 | # eval: (add-hook 'write-file-hooks 'time-stamp) 155 | # time-stamp-start: "scriptversion=" 156 | # time-stamp-format: "%:y-%02m-%02d.%02H" 157 | # time-stamp-end: "$" 158 | # End: 159 | -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- 1 | -*-outline-*- 2 | $B\:Y$O(B ChangeLog $B$r;2>H$7$F$/$@$5$$!#(B 3 | 4 | * navi2ch 1.8.0 -> 2.0.0 5 | find.2ch.net $B$K$h$k8!:w$KBP1~!#(B 6 | 7 | * navi2ch 1.7.5 -> 1.8.0 8 | configure $B$N%*%W%7%g%sJQ99!#(Bemacs $B$N;XDj$O(B --with-emacs $B%*%W%7%g%s$G$O(B 9 | $B$J$/4D6-JQ?t(B EMACS $B$G9T$&!#(B--with-lispdir $B$r;XDj$7$J$$>l9g$N%G%U%)%k%H(B 10 | $B%G%#%l%/%H%j$bJQ99!#(B 11 | BE@2ch $B$N%m%0%$%s!"=q$-9~$_$KBP1~!#(B 12 | $BHD$4$H$KJ8;z%3!<%I$r;XDj2DG=$K!#(B 13 | $B%l%9$,(B hide $B$5$l$F$$$k$H$-%;%Q%l!<%?$rJQ99!#(B 14 | expire $B4XO"$N%P%0=$@5!#(B 15 | $B%a%C%;!<%8!"%W%m%s%W%H!"(Bdocstring $B$J$I$N:Y$+$JD4@0!#(B($BBgJ8;z(B/$B>.J8;z$H$+(B) 16 | $B2>A[HD$NL>A0$NF,$K(B "#" $B$rIU$1$k!#(B("history" $B"*(B "#history" $BEy(B) 17 | $B5l7A<0$N%;%Q%l!<%?$r;HMQ$7$?(B .dat $B%U%!%$%k$N07$$$,%G%U%)%k%H$GL58z$K!#(B 18 | $BM-8z$K$9$k$K$O(B ~/.navi2ch/init.el $B$J$I$G(B 19 | (add-to-list 'navi2ch-article-filter-list 20 | 'navi2ch-article-separator-filter) 21 | $B$J$I$H$9$k!#(B 22 | Samba24 $B$N;D$jIC?t$,I=<($5$l$k$h$&$K$J$C$?!#(B 23 | navi2ch-file-name-reserved-char-regexp $B$,GQ;_$5$l!"(B 24 | navi2ch-file-name-reserved-char-list $B$K$J$C$?!#(B 25 | $B%[%9%HL>!&(BIP$B%"%I%l%9$r%U%#%k%?(B/$B8!:w$N>r7o$K$G$-$k$h$&$K$J$C$?!#(B 26 | sssp $B%"%$%3%s$rI=<($9$k5!G=$NDI2C!#(B 27 | 28 | * navi2ch 1.7.4 -> 1.7.5 29 | JBBS@$B$7$?$i$P$N(B jbbs.livedoor.jp $B$X$N0\E>$KBP1~!#(B 30 | XEmacs $B$G$NJ8;z2=$1$KBP=h!#(B 31 | $BFC 1.7.4 34 | $B!|%5!<%P0\E>BP1~!#(B 35 | JBBS@$B$7$?$i$P$N(B livedoor $B$X$N0\E>$KBP1~!#(B 36 | 37 | * navi2ch 1.7.2 -> 1.7.3 38 | $B%M%C%H%o!<%/@\B3$K30It%3%^%s%I$d%f!<%6!l9g$O<+F0=hM}$7$J$$$h$&$K!#(B 40 | $B@55,I=8=$K1~$8$F%l%9Cf$N%F%-%9%H$K%j%s%/$rE=$k!#(B 41 | $BHD$N0\E>$N:]$N=hM}$rB?>/$^$7$K!#(B 42 | JBBS@$B$7$?$i$P$X$NBP1~6/2=!#(B 43 | 44 | * navi2ch 1.7.1 -> 1.7.2 45 | $B#2$A$c$s$M$k$N;EMMJQ99$KDI=>!#(B 46 | $BBg$-$J?tCM$N%9%lFb%j%s%/$G$N(B Emacs $B$N%O%s%0%"%C%W$KBP=h!#(B 47 | EmacsCE $B$K$A$g$C$HBP1~!#(B 48 | hook $BDI2C!#(B 49 | $B8!:w5!G=3H=A0Ms$N?t;z$r%9%lFb%j%s%/$K!#(B 52 | $B#2$A$c$s$M$k$N%1!<%?%$MQ(B URL $B$KBP1~!#(B 53 | 54 | * navi2ch 1.7 -> 1.7.1 55 | $B$^$A(BBBS$B$N%I%a%$%sL>JQ99$KBP1~(B 56 | $B$U$?$P$A$c$s$M$k(B (http://www.2chan.net/) $B$KBP1~!#(B 57 | navi2ch-auto-modify-file $B$NMM!9$JJQ99!#%G%U%)%k%H0J30$N;H$$J}$r$7$F$$(B 58 | $B$k>l9g$O(B ChangeLog $B$r;2>H!#(B 59 | 60 | * navi2ch 1.6.1 -> 1.7 61 | $B%m%C%/4XO"JQ99(B 62 | $B%l%9=q$-9~$_;~$N(B time $BJQ?t4XO"JQ99(B 63 | $B%l%9%U%#%k%?5!G=$NBgI}3H= 1.6.1 74 | $B%*%$%9%?!<:n@o$KBP1~!#(B 75 | $B%l%9%U%#%k%?5!G=(B ($B$"$\$\!<$s5!G=(B) $B$rDI2C!#(B 76 | $BAw?.95$($rJ]B8$G$-$k$h$&$K$J$C$?!#(B 77 | $B$$$o$f$k!V5!MM!9$J%P%0%U%#%C%/%9(B/$B5!G=DI2C!#(B 85 | 86 | * navi2ch 1.5.2 -> 1.6.0 87 | $BHD$N(B ID $B$,>WFM$7$F$bBg>fIW$K$J$C$?!#(B 88 | configure $B$K(B --with-packagedir $B%*%W%7%g%s$rDI2C!#(B(XEmacs $B$N$_(B) 89 | $B#2$A$c$s$M$k0J30$N(BBBS$B$r%5%]!<%H(B: $B#J#B#B#S!"#J#B#B#S!w$7$?$i$P!"$^$A#B#B#S(B 90 | $B%9%l$r;XDj$7$F%-%c%C%7%e%U%!%$%k$r>C$;$k$h$&$K$J$C$?!#(B 91 | AA $B$rF~NO$9$k:]$K%j%9%H$rI=<($G$-$k$h$&$K$J$C$?!#(B 92 | $B%G%#%l%/%H%j$K$"$k%9%l$rA4$FI=<($G$-$k$h$&$K$J$C$?!#(B 93 | $B%b%J!<%U%)%s%H$N;XDjJ}K!$,JQ$o$C$?!#(B(info $B;2>H(B) 94 | $B$=$NB>MM!9$J%P%0%U%#%C%/%9(B/$B5!G=DI2C!#(B 95 | 96 | * navi2ch 1.5.1 -> 1.5.2 97 | 2ch$B$N;EMMJQ99$KDI=>!#(B 98 | $BMM!9$J%P%0%U%#%C%/%9(B/$B5!G=DI2C!#(B 99 | 100 | * navi2ch 1.5 -> 1.5.1 101 | $B:G6a$N5,@)$KBP1~!#(B 102 | 103 | * navi2ch 1.4 -> 1.5 104 | base64 105 | $B2a5n%m%0(B 106 | article buffer $B$N?t$N@)8B(B 107 | configure $B$,8-$/$J$C$?(B 108 | 109 | $Id$ 110 | -------------------------------------------------------------------------------- /test/test.el: -------------------------------------------------------------------------------- 1 | ;; run with `emacs --batch --script test.el' 2 | 3 | ;;; load ert 4 | (when load-file-name 5 | (add-to-list 'load-path 6 | (expand-file-name "ert" 7 | (file-name-directory load-file-name)))) 8 | (require 'ert-batch) 9 | 10 | ;;; load navi2ch 11 | 12 | (setq load-path 13 | (cons (expand-file-name ".." 14 | (file-name-directory load-file-name)) 15 | load-path)) 16 | (require 'navi2ch-util) 17 | (require 'navi2ch-http-date) 18 | (require 'navi2ch-net) 19 | (require 'navi2ch-thumbnail) 20 | 21 | ;;; define tests 22 | 23 | (ert-deftest replace-html-tag () 24 | (should (string= 25 | (navi2ch-replace-html-tag 26 | " >>139
foo") 27 | " >>139 \n foo"))) 28 | 29 | (ert-deftest http-date-test-1 () 30 | (let ((expected "Sun, 06 Nov 1994 08:49:37 GMT")) 31 | (should (string= expected (navi2ch-http-date-encode 32 | (navi2ch-http-date-decode 33 | "Sun, 06 Nov 1994 08:49:37 GMT")))))) 34 | (ert-deftest http-date-test-2 () 35 | (let ((expected "Sun, 06 Nov 1994 08:49:37 GMT")) 36 | (should (string= expected (navi2ch-http-date-encode 37 | (navi2ch-http-date-decode 38 | "Sunday, 06-Nov-94 08:49:37 GMT")))))) 39 | (ert-deftest http-date-test-3 () 40 | (let ((expected "Sun, 06 Nov 1994 08:49:37 GMT")) 41 | (should (string= expected (navi2ch-http-date-encode 42 | (navi2ch-http-date-decode 43 | "Sun Nov 6 08:49:37 1994")))))) 44 | 45 | (ert-deftest tanpan-check-1 () 46 | (should (navi2ch-net-is-tanpan-thread-p 47 | "短パンマン ★<><>2010/09/15 01:09:42 ID:TanpanM<>いろいろあるさ @bg r.so ver 2008/02/19
ERROR = 5656
(e_mes = [])
<>名古屋はエ〜エ〜で ♪ 48 | "))) 49 | 50 | (ert-deftest thumbnail-save-good-work () 51 | (let* ((workdir (make-temp-file "workdir." t)) 52 | (fileFoo (expand-file-name "foo" workdir)) 53 | (fileBar (expand-file-name "bar" workdir))) 54 | (unwind-protect 55 | (progn 56 | (with-temp-file fileFoo (insert "foo")) 57 | ;; copy する 58 | (navi2ch-thumbnail-save-content fileFoo fileBar) 59 | (should 60 | (string= (with-temp-buffer (insert-file-contents fileBar) (buffer-string)) 61 | "foo")) 62 | (with-temp-file fileBar (insert "bar")) 63 | ;; overwrite 64 | (navi2ch-thumbnail-save-content fileFoo fileBar t) 65 | (should 66 | (string= (with-temp-buffer (insert-file-contents fileBar) (buffer-string)) 67 | "foo"))) 68 | (delete-directory workdir t)))) 69 | 70 | (ert-deftest thumbnail-save-interactive-check () 71 | (let ((si:read-file-name (symbol-function 'read-file-name)) 72 | intform) 73 | (unwind-protect 74 | (progn 75 | (fset 'read-file-name (lambda (a b c) 76 | (expand-file-name (or c "hoge") b))) 77 | (lexical-let ((evalform (cadr (interactive-form 'navi2ch-thumbnail-save-content)))) 78 | (fset 'intform (lambda () (eval evalform)))) 79 | (with-temp-buffer 80 | ;; prop `navi2ch-link' から読みだす。読みだせないとエラー。 81 | (should-error (intform)) 82 | (save-excursion (insert (propertize "foo" 'navi2ch-link "foobar"))) 83 | (let ((res (intform))) 84 | (should (equal res (list "foobar" 85 | (expand-file-name "hoge" 86 | navi2ch-thumbnail-save-content-dir) 87 | 0)))) 88 | (put-text-property (point-min) (point-max) 'file-name "barbaz") 89 | (let ((res (intform))) 90 | (should (equal res (list "foobar" 91 | (expand-file-name "barbaz" 92 | navi2ch-thumbnail-save-content-dir) 93 | 0)))))) 94 | (fset 'read-file-name si:read-file-name)))) 95 | 96 | (ert-deftest thumbnail-save-file-invalid () 97 | (let* ((workdir (make-temp-file "workdir." t)) 98 | (fileFoo (expand-file-name "foo" workdir)) 99 | (fileBar (expand-file-name "bar" workdir))) 100 | (unwind-protect 101 | (progn 102 | ;; ファイルがない 103 | (should-error 104 | (navi2ch-thumbnail-save-content fileFoo fileBar)) 105 | ;; ファイルが書きこみできない 106 | (with-temp-file fileFoo (insert "foo")) 107 | (with-temp-file fileBar (insert "bar")) 108 | (chmod fileBar 256) 109 | (should-error 110 | (navi2ch-thumbnail-save-content fileFoo fileBar))) 111 | (delete-directory workdir t)))) 112 | 113 | (ert-deftest thumbnail-save-invalid-argument () 114 | ;; 無効な引数 115 | (let* ((workdir (make-temp-file "workdir." t)) 116 | (fileFoo (expand-file-name "foo" workdir))) 117 | (unwind-protect 118 | (progn 119 | (should-error 120 | (navi2ch-thumbnail-save-content nil nil)) 121 | (should-error 122 | (navi2ch-thumbnail-save-content nil fileFoo)) 123 | (should-error 124 | (navi2ch-thumbnail-save-content fileFoo nil))) 125 | (delete-directory workdir t)))) 126 | 127 | (ert-deftest thumbnail-save-same-file () 128 | ;; 同じファイル 129 | (let* ((workdir (make-temp-file "workdir." t)) 130 | (file (expand-file-name "foo" workdir))) 131 | (unwind-protect 132 | (progn 133 | (with-temp-file file (insert "foo")) 134 | (should-error 135 | (navi2ch-thumbnail-save-content file file t)) 136 | (should-error 137 | (navi2ch-thumbnail-save-content file file nil))) 138 | (delete-directory workdir t)))) 139 | 140 | (ert-deftest bm-sort-by-number () 141 | (should (string= 142 | "1\n2\n 12\n1000\n" 143 | (with-temp-buffer 144 | (insert "1\n1000\n2\n 12\n") 145 | (navi2ch-bm-sort-by-number) 146 | (buffer-substring-no-properties (point-min) (point-max)))))) 147 | 148 | ;;; run the tests 149 | 150 | (ert-run-tests-batch) 151 | -------------------------------------------------------------------------------- /navi2ch-directory.el: -------------------------------------------------------------------------------- 1 | ;;; navi2ch-directory.el --- List directory files Module for Navi2ch -*- coding: iso-2022-7bit; -*- 2 | 3 | ;; Copyright (C) 2002, 2003, 2004, 2005, 2008 by Navi2ch Project 4 | 5 | ;; Author: Taiki SUGAWARA 6 | ;; Keywords: 2ch, network 7 | 8 | ;; This file is free software; you can redistribute it and/or modify 9 | ;; it under the terms of the GNU General Public License as published by 10 | ;; the Free Software Foundation; either version 2, or (at your option) 11 | ;; any later version. 12 | 13 | ;; This file is distributed in the hope that it will be useful, 14 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | ;; GNU General Public License for more details. 17 | 18 | ;; You should have received a copy of the GNU General Public License 19 | ;; along with GNU Emacs; see the file COPYING. If not, write to 20 | ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 21 | ;; Boston, MA 02111-1307, USA. 22 | 23 | ;;; Commentary: 24 | 25 | ;; 26 | 27 | ;;; Code: 28 | (provide 'navi2ch-directory) 29 | (defconst navi2ch-directory-ident 30 | "$Id$") 31 | 32 | (eval-when-compile (require 'cl)) 33 | 34 | (require 'navi2ch) 35 | 36 | (defvar navi2ch-directory-mode-map nil) 37 | (unless navi2ch-directory-mode-map 38 | (let ((map (make-sparse-keymap))) 39 | (set-keymap-parent map navi2ch-bm-mode-map) 40 | (define-key map "s" 'navi2ch-directory-sync) 41 | (setq navi2ch-directory-mode-map map))) 42 | 43 | (defvar navi2ch-directory-mode-menu-spec 44 | (navi2ch-bm-make-menu-spec 45 | "Directory" 46 | nil)) 47 | 48 | (defvar navi2ch-directory-board 49 | '((name . "$B%U%!%$%k0lMw(B") 50 | (type . directory) 51 | (id . "#directory"))) 52 | 53 | (defvar navi2ch-directory-current-board nil) 54 | (defvar navi2ch-directory-subject-list nil) 55 | 56 | ;;; navi2ch-bm callbacks 57 | (defun navi2ch-directory-set-property (begin end item) 58 | (put-text-property begin end 'item item)) 59 | 60 | (defun navi2ch-directory-get-property (point) 61 | (get-text-property 62 | (save-excursion (goto-char point) 63 | (beginning-of-line) 64 | (point)) 65 | 'item)) 66 | 67 | (defun navi2ch-directory-get-article (item) 68 | item) 69 | 70 | (defun navi2ch-directory-get-board (item) 71 | navi2ch-directory-current-board) 72 | 73 | (defun navi2ch-directory-exit () 74 | (run-hooks 'navi2ch-directory-exit-hook)) 75 | 76 | ;; regist board 77 | (navi2ch-bm-regist-board 'directory 'navi2ch-directory 78 | navi2ch-directory-board) 79 | 80 | ;;; navi2ch-directory functions 81 | (defun navi2ch-directory-insert-subjects () 82 | (let ((i 1)) 83 | (dolist (article navi2ch-directory-subject-list) 84 | (navi2ch-bm-insert-subject 85 | article i 86 | (cdr (assq 'subject article)) 87 | (format "[%s]" (cdr (assq 'artid article)))) 88 | (setq i (1+ i))))) 89 | 90 | (defun navi2ch-directory-set-current-board (directory) 91 | (setq directory (expand-file-name directory)) 92 | (setq navi2ch-directory-current-board 93 | (list (cons 'name navi2ch-board-name-from-file) 94 | (cons 'uri (navi2ch-filename-to-url directory)) 95 | (cons 'id "navi2ch")))) 96 | 97 | (defun navi2ch-directory-set-subject-list (directory) 98 | (setq directory (file-name-as-directory 99 | (expand-file-name directory))) 100 | (setq navi2ch-directory-subject-list 101 | (mapcar 102 | (lambda (file) 103 | (setq file (concat directory file)) 104 | (list 105 | (cons 'subject 106 | (cdr (assq 'subject 107 | (navi2ch-article-get-first-message-from-file 108 | file)))) 109 | (cons 'artid 110 | (navi2ch-article-file-name-to-artid file)))) 111 | (sort (directory-files directory nil navi2ch-article-local-dat-regexp t) 112 | (lambda (x y) 113 | (not (navi2ch-right-aligned-string< x y))))))) 114 | 115 | (defun navi2ch-directory-find-directory (directory) 116 | (interactive "DDirectory: ") 117 | (when (file-directory-p directory) 118 | (setq directory (expand-file-name directory)) 119 | (setq default-directory directory) 120 | (navi2ch-directory-set-current-board directory) 121 | (navi2ch-directory-set-subject-list directory) 122 | (navi2ch-bm-select-board navi2ch-directory-board))) 123 | 124 | (defun navi2ch-directory (&rest args) 125 | "directory $B$rI=<($9$k!#(B" 126 | (navi2ch-directory-mode) 127 | (navi2ch-bm-setup 'navi2ch-directory) 128 | (navi2ch-directory-sync)) 129 | 130 | 131 | (defun navi2ch-directory-sync () 132 | (interactive) 133 | (let ((buffer-read-only nil)) 134 | (erase-buffer) 135 | (save-excursion 136 | (navi2ch-directory-insert-subjects)))) 137 | 138 | (easy-menu-define navi2ch-directory-mode-menu 139 | navi2ch-directory-mode-map 140 | "Menu used in navi2ch-directory" 141 | navi2ch-directory-mode-menu-spec) 142 | 143 | (defun navi2ch-directory-setup-menu () 144 | (easy-menu-add navi2ch-directory-mode-menu)) 145 | 146 | (defun navi2ch-directory-mode () 147 | "\\{navi2ch-directory-mode-map}" 148 | (interactive) 149 | (kill-all-local-variables) 150 | (setq major-mode 'navi2ch-directory-mode) 151 | (setq mode-name "Navi2ch Directory") 152 | (setq buffer-read-only t) 153 | (buffer-disable-undo) 154 | (use-local-map navi2ch-directory-mode-map) 155 | (navi2ch-directory-setup-menu) 156 | (run-hooks 'navi2ch-bm-mode-hook 'navi2ch-directory-mode-hook)) 157 | 158 | (run-hooks 'navi2ch-directory-load-hook) 159 | ;;; navi2ch-directory.el ends here 160 | -------------------------------------------------------------------------------- /navi2ch-articles.el: -------------------------------------------------------------------------------- 1 | ;;; navi2ch-articles.el --- Article List Module for Navi2ch -*- coding: iso-2022-7bit; -*- 2 | 3 | ;; Copyright (C) 2001, 2002, 2003, 2004, 2008 by Navi2ch Project 4 | 5 | ;; Author: Taiki SUGAWARA 6 | ;; Keywords: 2ch, network 7 | 8 | ;; This file is free software; you can redistribute it and/or modify 9 | ;; it under the terms of the GNU General Public License as published by 10 | ;; the Free Software Foundation; either version 2, or (at your option) 11 | ;; any later version. 12 | 13 | ;; This file is distributed in the hope that it will be useful, 14 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | ;; GNU General Public License for more details. 17 | 18 | ;; You should have received a copy of the GNU General Public License 19 | ;; along with GNU Emacs; see the file COPYING. If not, write to 20 | ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 21 | ;; Boston, MA 02111-1307, USA. 22 | 23 | ;;; Commentary: 24 | 25 | ;; 26 | 27 | ;;; Code: 28 | (provide 'navi2ch-articles) 29 | (defconst navi2ch-articles-ident 30 | "$Id$") 31 | 32 | (eval-when-compile (require 'cl)) 33 | 34 | (require 'navi2ch) 35 | 36 | (defvar navi2ch-articles-mode-map nil) 37 | (unless navi2ch-articles-mode-map 38 | (let ((map (make-sparse-keymap))) 39 | (set-keymap-parent map navi2ch-bm-mode-map) 40 | ;; (define-key navi2ch-articles-mode-map "q" 'navi2ch-articles-exit) 41 | (define-key map "d" 'navi2ch-articles-delete) 42 | (define-key map "md" 'navi2ch-articles-delete-mark-aritcle) 43 | (define-key map "R" 'navi2ch-articles-remove-article) 44 | (define-key map "mR" 'navi2ch-articles-remove-mark-article) 45 | (define-key map "s" 'navi2ch-articles-sync) 46 | (setq navi2ch-articles-mode-map map))) 47 | 48 | (defvar navi2ch-articles-mode-menu-spec 49 | (navi2ch-bm-make-menu-spec 50 | "Articles" 51 | nil)) 52 | 53 | (defvar navi2ch-articles-board 54 | '((name . "$BI=<(%9%l0lMw(B") 55 | (type . articles) 56 | (id . "#articles"))) 57 | 58 | ;;; navi2ch-bm callbacks 59 | (defun navi2ch-articles-set-property (begin end item) 60 | (put-text-property begin end 'buffer item)) 61 | 62 | (defun navi2ch-articles-get-property (point) 63 | (get-text-property point 'buffer)) 64 | 65 | (defun navi2ch-articles-get-article (item) 66 | (when (and item 67 | (buffer-live-p item)) 68 | (with-current-buffer item 69 | navi2ch-article-current-article))) 70 | 71 | (defun navi2ch-articles-get-board (item) 72 | (when (and item 73 | (buffer-live-p item)) 74 | (with-current-buffer item 75 | navi2ch-article-current-board))) 76 | 77 | (defun navi2ch-articles-exit () 78 | (run-hooks 'navi2ch-articles-exit-hook)) 79 | 80 | ;; regist board 81 | (navi2ch-bm-regist-board 'articles 'navi2ch-articles 82 | navi2ch-articles-board) 83 | 84 | ;;; navi2ch-articles functions 85 | (defun navi2ch-articles-insert-subjects () 86 | (let ((i 1)) 87 | (dolist (x (navi2ch-article-buffer-list)) 88 | (let ((article (navi2ch-articles-get-article x)) 89 | (board (navi2ch-articles-get-board x))) 90 | (navi2ch-bm-insert-subject 91 | x i 92 | (cdr (assq 'subject article)) 93 | (format "[%s]" (cdr (assq 'name board)))) 94 | (setq i (1+ i)))))) 95 | 96 | (defun navi2ch-articles-delete () 97 | "$B$=$N9T$r(B articles $B$+$i:o=|$7$F!"$=$N(B article buffer $B$b>C$9!#(B" 98 | (interactive) 99 | (let ((buf (save-excursion (beginning-of-line) 100 | (navi2ch-articles-get-property (point))))) 101 | (if buf 102 | (let ((buffer-read-only nil)) 103 | (kill-buffer buf) 104 | (delete-region (save-excursion (beginning-of-line) (point)) 105 | (save-excursion (forward-line) (point))) 106 | (and (eobp) (not (bobp)) 107 | (forward-line -1))) 108 | (message "Can't select this line!")))) 109 | 110 | (defun navi2ch-articles-delete-mark-aritcle () 111 | (interactive) 112 | (navi2ch-bm-exec-subr 'navi2ch-articles-delete)) 113 | 114 | (defun navi2ch-articles-remove-article () 115 | (interactive) 116 | (navi2ch-bm-remove-article) 117 | (navi2ch-articles-delete)) 118 | 119 | (defun navi2ch-articles-remove-mark-article () 120 | (interactive) 121 | (navi2ch-bm-exec-subr 'navi2ch-articles-remove-article)) 122 | 123 | (defun navi2ch-articles (&rest args) 124 | "articles $B$rI=<($9$k!#(B" 125 | (navi2ch-articles-mode) 126 | (navi2ch-bm-setup 'navi2ch-articles) 127 | (navi2ch-articles-sync)) 128 | 129 | (defun navi2ch-articles-sync () 130 | (interactive) 131 | (let ((buffer-read-only nil)) 132 | (erase-buffer) 133 | (save-excursion 134 | (navi2ch-articles-insert-subjects)))) 135 | 136 | (easy-menu-define navi2ch-articles-mode-menu 137 | navi2ch-articles-mode-map 138 | "Menu used in navi2ch-articles" 139 | navi2ch-articles-mode-menu-spec) 140 | 141 | (defun navi2ch-articles-setup-menu () 142 | (easy-menu-add navi2ch-articles-mode-menu)) 143 | 144 | (defun navi2ch-articles-mode () 145 | "\\{navi2ch-articles-mode-map}" 146 | (interactive) 147 | (kill-all-local-variables) 148 | (setq major-mode 'navi2ch-articles-mode) 149 | (setq mode-name "Navi2ch Articles") 150 | (setq buffer-read-only t) 151 | (buffer-disable-undo) 152 | (use-local-map navi2ch-articles-mode-map) 153 | (navi2ch-articles-setup-menu) 154 | (run-hooks 'navi2ch-bm-mode-hook 'navi2ch-articles-mode-hook)) 155 | 156 | (run-hooks 'navi2ch-articles-load-hook) 157 | ;;; navi2ch-articles.el ends here 158 | -------------------------------------------------------------------------------- /navi2ch-http-date.el: -------------------------------------------------------------------------------- 1 | ;;; navi2ch-http-date.el --- parser / generator of HTTP-date format -*- coding: iso-2022-7bit; -*- 2 | 3 | ;; Copyright (C) 2002, 2003, 2008 by Navi2ch Project 4 | 5 | ;; Author: Nanashi San 6 | ;; Keywords: 2ch, network 7 | 8 | ;; This file is free software; you can redistribute it and/or modify 9 | ;; it under the terms of the GNU General Public License as published by 10 | ;; the Free Software Foundation; either version 2, or (at your option) 11 | ;; any later version. 12 | 13 | ;; This file is distributed in the hope that it will be useful, 14 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | ;; GNU General Public License for more details. 17 | 18 | ;; You should have received a copy of the GNU General Public License 19 | ;; along with GNU Emacs; see the file COPYING. If not, write to 20 | ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 21 | ;; Boston, MA 02111-1307, USA. 22 | 23 | ;;; Commentary: 24 | 25 | ;; From RFC 2616 26 | 27 | ;; 3.3.1 Full Date 28 | ;; 29 | ;; HTTP applications have historically allowed three different formats 30 | ;; for the representation of date/time stamps: 31 | ;; 32 | ;; Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123 33 | ;; Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036 34 | ;; Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format 35 | ;; 36 | ;; The first format is preferred as an Internet standard and represents 37 | ;; a fixed-length subset of that defined by RFC 1123 [8] (an update to 38 | ;; RFC 822 [9]). The second format is in common use, but is based on the 39 | ;; obsolete RFC 850 [12] date format and lacks a four-digit year. 40 | ;; HTTP/1.1 clients and servers that parse the date value MUST accept 41 | ;; all three formats (for compatibility with HTTP/1.0), though they MUST 42 | ;; only generate the RFC 1123 format for representing HTTP-date values 43 | ;; in header fields. See section 19.3 for further information. 44 | ;; 45 | ;; Note: Recipients of date values are encouraged to be robust in 46 | ;; accepting date values that may have been sent by non-HTTP 47 | ;; applications, as is sometimes the case when retrieving or posting 48 | ;; messages via proxies/gateways to SMTP or NNTP. 49 | ;; 50 | ;; All HTTP date/time stamps MUST be represented in Greenwich Mean Time 51 | ;; (GMT), without exception. For the purposes of HTTP, GMT is exactly 52 | ;; equal to UTC (Coordinated Universal Time). This is indicated in the 53 | ;; first two formats by the inclusion of "GMT" as the three-letter 54 | ;; abbreviation for time zone, and MUST be assumed when reading the 55 | ;; asctime format. HTTP-date is case sensitive and MUST NOT include 56 | ;; additional LWS beyond that specifically included as SP in the 57 | ;; grammar. 58 | ;; 59 | ;; HTTP-date = rfc1123-date | rfc850-date | asctime-date 60 | ;; rfc1123-date = wkday "," SP date1 SP time SP "GMT" 61 | ;; rfc850-date = weekday "," SP date2 SP time SP "GMT" 62 | ;; asctime-date = wkday SP date3 SP time SP 4DIGIT 63 | ;; date1 = 2DIGIT SP month SP 4DIGIT 64 | ;; ; day month year (e.g., 02 Jun 1982) 65 | ;; date2 = 2DIGIT "-" month "-" 2DIGIT 66 | ;; ; day-month-year (e.g., 02-Jun-82) 67 | ;; date3 = month SP ( 2DIGIT | ( SP 1DIGIT )) 68 | ;; ; month day (e.g., Jun 2) 69 | ;; time = 2DIGIT ":" 2DIGIT ":" 2DIGIT 70 | ;; ; 00:00:00 - 23:59:59 71 | ;; wkday = "Mon" | "Tue" | "Wed" 72 | ;; | "Thu" | "Fri" | "Sat" | "Sun" 73 | ;; weekday = "Monday" | "Tuesday" | "Wednesday" 74 | ;; | "Thursday" | "Friday" | "Saturday" | "Sunday" 75 | ;; month = "Jan" | "Feb" | "Mar" | "Apr" 76 | ;; | "May" | "Jun" | "Jul" | "Aug" 77 | ;; | "Sep" | "Oct" | "Nov" | "Dec" 78 | ;; 79 | ;; Note: HTTP requirements for the date/time stamp format apply only 80 | ;; to their usage within the protocol stream. Clients and servers are 81 | ;; not required to use these formats for user presentation, request 82 | ;; logging, etc. 83 | 84 | ;;; Code: 85 | 86 | (provide 'navi2ch-http-date) 87 | (defconst navi2ch-http-date-ident 88 | "$Id$") 89 | 90 | (require 'regexp-opt) 91 | (require 'timezone) 92 | 93 | (defun navi2ch-http-date-encode (time) 94 | "$BFbIt7A<0(B TIME $B$r(B RFC 1123 $B7A<0$KJQ49$9$k!#(B" 95 | (apply (lambda (wday month day time year) 96 | (format "%s, %02d %s %s %s GMT" 97 | wday (string-to-number day) month year time)) 98 | (split-string 99 | (current-time-string (let ((decoded (decode-time time))) 100 | (apply #'encode-time 101 | (- (car decoded) 102 | (car (last decoded))) 103 | (cdr decoded))))))) 104 | 105 | (defun navi2ch-http-date-decode (http-date) 106 | "HTTP-DATE $B$rFbIt7A<0$KJQ49$9$k!#(B" 107 | ;; XEmacs $B$@$H(B RFC 850 $B7A<0$N(B "-" $BIU$-$NF|IU$r%Q!<%9$G$-$J$$$N$G!#(B 108 | (if (string-match "\\([0-9]+\\)-\\([A-Za-z]+\\)-\\([0-9]+\\)" http-date) 109 | (setq http-date (replace-match "\\1 \\2 \\3" nil nil http-date))) 110 | (let ((now (timezone-fix-time http-date "GMT" "GMT"))) 111 | (encode-time (aref now 5) (aref now 4) (aref now 3) 112 | (aref now 2) (aref now 1) (aref now 0) 113 | (aref now 6)))) 114 | 115 | ;;; navi2ch-http-date.el ends here 116 | -------------------------------------------------------------------------------- /test/ert/ert-batch.el: -------------------------------------------------------------------------------- 1 | ;;; ert-batch.el --- Functions for running ERT tests in batch mode 2 | 3 | ;; Copyright (C) 2007, 2008, 2010 Christian M. Ohler 4 | 5 | ;; Author: Christian M. Ohler 6 | 7 | ;; This file is NOT part of GNU Emacs. 8 | 9 | ;; This program is free software: you can redistribute it and/or 10 | ;; modify it under the terms of the GNU General Public License as 11 | ;; published by the Free Software Foundation, either version 3 of the 12 | ;; License, or (at your option) any later version. 13 | ;; 14 | ;; This program is distributed in the hope that it will be useful, but 15 | ;; WITHOUT ANY WARRANTY; without even the implied warranty of 16 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | ;; General Public License for more details. 18 | ;; 19 | ;; You should have received a copy of the GNU General Public License 20 | ;; along with this program. If not, see `http://www.gnu.org/licenses/'. 21 | 22 | ;;; Commentary: 23 | 24 | ;; This file is part of ERT, the Emacs Lisp Regression Testing tool. 25 | ;; See ert.el or the texinfo manual for more details. 26 | 27 | ;;; Code: 28 | 29 | (eval-when-compile 30 | (require 'cl)) 31 | (require 'ert-run) 32 | 33 | (defvar ert-batch-backtrace-right-margin 70 34 | "*The maximum line length for printing backtraces in `ert-run-tests-batch'.") 35 | 36 | ;;;###autoload 37 | (defun ert-run-tests-batch (&optional selector) 38 | "Run the tests specified by SELECTOR, printing results to the terminal. 39 | 40 | SELECTOR works as described in `ert-select-tests', except if 41 | SELECTOR is nil, in which case all tests rather than none will be 42 | run; this makes the command line \"emacs -batch -l my-tests.el -f 43 | ert-run-tests-batch-and-exit\" useful. 44 | 45 | Returns the stats object." 46 | (unless selector (setq selector 't)) 47 | (ert-run-tests 48 | selector 49 | (lambda (event-type &rest event-args) 50 | (ecase event-type 51 | (run-started 52 | (destructuring-bind (stats) event-args 53 | (message "Running %s tests (%s)" 54 | (length (ert--stats-tests stats)) 55 | (ert--format-time-iso8601 (ert--stats-start-time stats))))) 56 | (run-ended 57 | (destructuring-bind (stats abortedp) event-args 58 | (let ((unexpected (ert-stats-completed-unexpected stats))) 59 | (message "\n%sRan %s tests, %s results were as expected%s (%s)\n" 60 | (if (not abortedp) 61 | "" 62 | "Aborted: ") 63 | (ert-stats-total stats) 64 | (ert-stats-completed-expected stats) 65 | (if (zerop unexpected) 66 | "" 67 | (format ", %s unexpected" unexpected)) 68 | (ert--format-time-iso8601 (ert--stats-end-time stats))) 69 | (unless (zerop unexpected) 70 | (message "%s unexpected results:" unexpected) 71 | (loop for test across (ert--stats-tests stats) 72 | for result = (ert-test-most-recent-result test) do 73 | (when (not (ert-test-result-expected-p test result)) 74 | (message "%9s %S" 75 | (ert-string-for-test-result result nil) 76 | (ert-test-name test)))) 77 | (message "%s" ""))))) 78 | (test-started 79 | ) 80 | (test-ended 81 | (destructuring-bind (stats test result) event-args 82 | (etypecase result 83 | (ert-test-passed) 84 | (ert-test-result-with-condition 85 | (message "Test %S backtrace:" (ert-test-name test)) 86 | (with-temp-buffer 87 | (ert--print-backtrace (ert-test-result-with-condition-backtrace 88 | result)) 89 | (goto-char (point-min)) 90 | (while (not (eobp)) 91 | (let ((start (point)) 92 | (end (progn (end-of-line) (point)))) 93 | (setq end (min end 94 | (+ start ert-batch-backtrace-right-margin))) 95 | (message "%s" (buffer-substring-no-properties 96 | start end))) 97 | (forward-line 1))) 98 | (with-temp-buffer 99 | (insert " ") 100 | (let ((print-escape-newlines t) 101 | (print-level 5) 102 | (print-length 10)) 103 | (let ((begin (point))) 104 | (ert--pp-with-indentation-and-newline 105 | (ert-test-result-with-condition-condition result)))) 106 | (goto-char (1- (point-max))) 107 | (assert (looking-at "\n")) 108 | (delete-char 1) 109 | (message "Test %S condition:" (ert-test-name test)) 110 | (message "%s" (buffer-string)))) 111 | (ert-test-aborted-with-non-local-exit)) 112 | (let* ((max (prin1-to-string (length (ert--stats-tests stats)))) 113 | (format-string (concat "%9s %" 114 | (prin1-to-string (length max)) 115 | "s/" max " %S"))) 116 | (message format-string 117 | (ert-string-for-test-result result 118 | (ert-test-result-expected-p 119 | test result)) 120 | (1+ (ert--stats-test-pos stats test)) 121 | (ert-test-name test))))))))) 122 | 123 | ;;;###autoload 124 | (defun ert-run-tests-batch-and-exit (&optional selector) 125 | "Like `ert-run-tests-batch', but exits Emacs when done. 126 | 127 | The exit status will be 0 if all test results were as expected, 1 128 | on unexpected results, or 2 if the framework detected an error 129 | outside of the tests (e.g. invalid SELECTOR or bug in the code 130 | that runs the tests)." 131 | (unwind-protect 132 | (let ((stats (ert-run-tests-batch selector))) 133 | (kill-emacs (if (zerop (ert-stats-completed-unexpected stats)) 0 1))) 134 | (unwind-protect 135 | (progn 136 | (message "Error running tests") 137 | (backtrace)) 138 | (kill-emacs 2)))) 139 | 140 | 141 | (provide 'ert-batch) 142 | 143 | ;;; ert-batch.el ends here 144 | -------------------------------------------------------------------------------- /navi2ch-jbbs-net.el: -------------------------------------------------------------------------------- 1 | ;;; navi2ch-jbbs-net.el --- View jbbs.net module for Navi2ch. -*- coding: iso-2022-7bit; -*- 2 | 3 | ;; Copyright (C) 2002, 2003, 2004 by Navi2ch Project 4 | 5 | ;; Author: 6 | ;; Part5 $B%9%l$N(B 509 $B$NL>L5$7$5$s(B 7 | ;; 8 | 9 | ;; Keywords: 2ch, network 10 | 11 | ;; This file is free software; you can redistribute it and/or modify 12 | ;; it under the terms of the GNU General Public License as published by 13 | ;; the Free Software Foundation; either version 2, or (at your option) 14 | ;; any later version. 15 | 16 | ;; This file is distributed in the hope that it will be useful, 17 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | ;; GNU General Public License for more details. 20 | 21 | ;; You should have received a copy of the GNU General Public License 22 | ;; along with GNU Emacs; see the file COPYING. If not, write to 23 | ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 24 | ;; Boston, MA 02111-1307, USA. 25 | 26 | ;;; Commentary: 27 | 28 | ;; 29 | 30 | ;;; Code: 31 | (provide 'navi2ch-jbbs-net) 32 | (defconst navi2ch-jbbs-net-ident 33 | "$Id$") 34 | 35 | (require 'navi2ch-multibbs) 36 | 37 | (defvar navi2ch-jbbs-func-alist 38 | '((bbs-p . navi2ch-jbbs-p) 39 | (subject-callback . navi2ch-jbbs-subject-callback) 40 | (article-update . navi2ch-jbbs-article-update) 41 | (article-to-url . navi2ch-jbbs-article-to-url) 42 | (send-message . navi2ch-jbbs-send-message) 43 | (send-success-p . navi2ch-jbbs-send-message-success-p) 44 | (board-update . navi2ch-jbbs-board-update))) 45 | 46 | (defvar navi2ch-jbbs-variable-alist 47 | (list (cons 'coding-system navi2ch-coding-system))) 48 | 49 | (navi2ch-multibbs-regist 'jbbs-net 50 | navi2ch-jbbs-func-alist 51 | navi2ch-jbbs-variable-alist) 52 | 53 | ;;------------- 54 | 55 | (defun navi2ch-jbbs-p (uri) 56 | "URI $B$,(B jbbs.net $B$J$i(B non-nil$B$rJV$9!#(B" 57 | (string-match "http://[^\\.]+\\.jbbs\\.net/" uri)) 58 | 59 | (navi2ch-multibbs-defcallback navi2ch-jbbs-subject-callback (jbbs-net) 60 | "subject.txt $B$r\\([0-9]+\\) $BL>A0!'(B\\(\\|<[^>]+>\\)\ 140 | \\(.*\\) <[^>]+> $BEj9FF|!'(B \\(.*\\)
\\(.*\\)

\n") 141 | 142 | (defun navi2ch-jbbs-parse () 143 | (let ((case-fold-search t)) 144 | (re-search-forward navi2ch-jbbs-parse-regexp nil t))) 145 | 146 | (defun navi2ch-jbbs-make-article () 147 | (let ((mail (match-string 3)) 148 | (name (match-string 4)) 149 | (date (match-string 5)) 150 | (contents (match-string 6))) 151 | ;; $B:9J,$NA0$N%;%Q%l!<%?$,(B "," $B$G8e$,(B "<>" $B$K$J$k$N$,$A$g$C$H%$%d!#(B 152 | (format "%s<>%s<>%s<>%s<>\n" 153 | name (or mail "") date contents ))) 154 | 155 | (navi2ch-multibbs-defcallback navi2ch-jbbs-article-callback (jbbs-net) 156 | (let ((beg (point)) 157 | (max-num 0) 158 | alist num min-num) 159 | (while (navi2ch-jbbs-parse) 160 | (setq num (string-to-number (match-string 1)) 161 | min-num (or min-num num) 162 | max-num (max max-num num) 163 | alist (cons (cons (string-to-number (match-string 1)) 164 | (navi2ch-jbbs-make-article)) 165 | alist))) 166 | (delete-region beg (point-max)) 167 | (when (and min-num max-num) 168 | (let ((i min-num)) 169 | (while (<= i max-num) 170 | (insert (or (cdr (assoc i alist)) 171 | "$B$"$\!<$s(B<>$B$"$\!<$s(B<>$B$"$\!<$s(B<>$B$"$\!<$s(B<>\n")) 172 | (setq i (1+ i))))))) 173 | 174 | (defun navi2ch-jbbs-board-update (board) 175 | (let ((url (navi2ch-board-get-url board)) 176 | (file (navi2ch-board-get-file-name board)) 177 | (time (cdr (assq 'time board))) 178 | (func (navi2ch-multibbs-subject-callback board))) 179 | (navi2ch-net-update-file url file time func))) 180 | 181 | ;;; navi2ch-jbbs-net.el ends here 182 | -------------------------------------------------------------------------------- /contrib/gikope.el: -------------------------------------------------------------------------------- 1 | ;;; gikope.el --- Ascii-Art handling tool 2 | 3 | ;; Copyright 2002 knok 4 | ;; License: GPL 5 | ;; $Id$ 6 | 7 | ;; related resources 8 | ;;; gikope http://go.to/gikope 9 | 10 | (eval-when-compile (require 'cl)) 11 | 12 | ;;; Variables 13 | ;; customizable variables 14 | (defvar gikope-aa-file "~/.navi2ch/mojidata.txt" 15 | "$B%.%3%ZMQ%G!<%?%U%!%$%k(B") 16 | (defvar gikope-aa-file-coding 'shift_jis-dos 17 | "$B%.%3%ZMQ%G!<%?%U%!%$%k$N%(%s%3!<%G%#%s%0(B") 18 | 19 | ;; global variables 20 | (defvar gikope-aa-location-alist '() 21 | "$B%.%3%ZMQ%G!<%?%U%!%$%k$NL>>N$H0LCV$rJ]B8$9$k(B alist") 22 | (defvar gikope-aa-buffer "*gikope*" 23 | "$B%.%3%ZMQ%G!<%?%U%!%$%k$rFI$_$3$s$@%P%C%U%!(B") 24 | (defvar gikope-aa-history nil 25 | "gikope-copy-to-killring-aa $BMQ%R%9%H%j(B") 26 | (defvar gikope-aa-begin-regex "^\\[MojieName=\\(.*\\)\\]$" 27 | "$B%.%3%Z%G!<%?(B $B%(%s%H%j3+;OItJ,$N@55,I=8=(B") 28 | (defvar gikope-aa-end-regex "^\\[END\\]$" 29 | "$B%.%3%Z%G!<%?(B $B%(%s%H%j=*N;ItJ,$N@55,I=8=(B") 30 | 31 | (defvar gikope-window-configuration nil) 32 | 33 | 34 | ;; gikope-list variables 35 | (defvar gikope-list-buffer-name "*gikope list*" "AA $B0lMw%P%C%U%!$NL>A0(B") 36 | (defvar gikope-list-window-width 20 "AA $B0lMw%P%C%U%!$NI}(B") 37 | 38 | ;; gikope-view variables 39 | (defvar gikope-view-buffer-name "*gikope view*" "AA $BI=<(%P%C%U%!$NL>A0(B") 40 | (defvar gikope-view-aa-name nil "$B8=:_I=<($7$F$$$k(B AA $B$NL>A0(B") 41 | 42 | ;;; Key Binds 43 | ;; gikope-list key binds 44 | (defvar gikope-list-mode-map nil) 45 | (unless gikope-list-mode-map 46 | (let ((map (make-sparse-keymap))) 47 | (define-key map "\r" 'gikope-list-select) 48 | (define-key map "." 'gikope-list-select) 49 | (define-key map " " 'gikope-list-select) 50 | (define-key map "n" 'next-line) 51 | (define-key map "p" 'previous-line) 52 | (define-key map "q" 'gikope-exit) 53 | (define-key map "1" 'delete-other-windows) 54 | (define-key map "w" 'gikope-list-copy) 55 | (setq gikope-list-mode-map map))) 56 | 57 | ;; gikope-view key binds 58 | (defvar gikope-view-mode-map nil) 59 | (unless gikope-view-mode-map 60 | (let ((map (make-sparse-keymap))) 61 | (define-key map "q" 'gikope-exit) 62 | (define-key map "w" 'gikope-view-copy) 63 | (define-key map "1" 'delete-other-windows) 64 | (setq gikope-view-mode-map map))) 65 | 66 | ;;; Functions 67 | ;; insert 68 | (defun gikope-copy-to-killring-aa (&optional arg) 69 | "$B%"%9%-!<%"!<%H$r(B kill-ring $B$KF~$l$k(B" 70 | (interactive "P") 71 | (unless gikope-aa-location-alist 72 | (gikope-parse-aa)) 73 | (let ((aa-location-alist gikope-aa-location-alist)) 74 | (if arg 75 | (let (re) 76 | (setq re (read-string "Regex: ")) 77 | (setq aa-location-alist (gikope-get-matched-aa-alist re)))) 78 | (gikope-copy-aa (completing-read 79 | "AA name: " 80 | aa-location-alist 81 | nil nil nil gikope-aa-history)))) 82 | ;; parse 83 | (defun gikope-parse-aa () 84 | "AA $B%G!<%?$rFI$_$3$_!"(Bparse AA data and build gikope-aa-location-alist" 85 | (interactive) 86 | (let (alistitem 87 | locitem 88 | mojiname 89 | start 90 | end) 91 | (save-excursion 92 | (set-buffer (get-buffer-create gikope-aa-buffer)) 93 | (erase-buffer) 94 | (let ((coding-system-for-read gikope-aa-file-coding)) 95 | (insert-file-contents gikope-aa-file)) 96 | (goto-char (point-min)) 97 | (setq buffer-read-only t) 98 | (while (re-search-forward gikope-aa-begin-regex nil t) 99 | (setq alistitem (match-string 1)) 100 | (forward-line) 101 | (setq locitem (point)) 102 | (re-search-forward gikope-aa-end-regex) 103 | (beginning-of-line) 104 | (setq locitem (cons locitem (point))) 105 | (setq alistitem (cons alistitem (list locitem))) 106 | (setq gikope-aa-location-alist 107 | (cons alistitem gikope-aa-location-alist)))))) 108 | 109 | ;; 110 | (defun gikope (&optional arg) 111 | "$B%.%3%Z(B $BA00lMw$rI=<($9$k(B" 156 | (interactive) 157 | (gikope-list-mode) 158 | (let ((buffer-read-only nil)) 159 | (erase-buffer) 160 | (dolist (name aa-alist) 161 | (insert (car name) "\n"))) 162 | (goto-char (point-min)) 163 | (set-buffer-modified-p nil)) 164 | 165 | (defun gikope-list-mode () 166 | "\\{gikope-list-mode-map}" 167 | (interactive) 168 | (kill-all-local-variables) 169 | (use-local-map gikope-list-mode-map) 170 | (setq mode-name "Gikope List") 171 | (setq major-mode 'gikope-list-mode) 172 | (setq buffer-read-only t) 173 | (run-hooks 'gikope-list-mode-hook)) 174 | 175 | ;; gikope-list commands 176 | (defun gikope-list-select () 177 | "$B8=:_9T$N(B AA $B$rA*Br$9$k(B" 178 | (interactive) 179 | (let ((name (gikope-list-current-name))) 180 | (unless (get-buffer-window gikope-view-buffer-name) 181 | (split-window-horizontally gikope-list-window-width) 182 | (display-buffer (get-buffer-create gikope-view-buffer-name))) 183 | (gikope-view name))) 184 | 185 | (defun gikope-list-copy () 186 | "$B8=:_9T$N(B AA $B$r(B kill-ring $B$K%3%T!<$9$k(B" 187 | (interactive) 188 | (gikope-list-select) 189 | (gikope-view-copy)) 190 | 191 | ;; gikope-list internal functions 192 | (defun gikope-list-current-name () 193 | "$B8=:_9T$NL>A0$rC$9!#(B" 91 | (interactive) 92 | (run-hooks 'navi2ch-head-exit-hook) 93 | (let ((exit (get-text-property (point-min) 'navi2ch-head-exit)) 94 | (board navi2ch-head-current-board) 95 | (article navi2ch-head-current-article) 96 | win buf) 97 | (cond 98 | ((eq exit 'navi2ch-article-mode) 99 | (setq buf (get-buffer (navi2ch-article-get-buffer-name board article))) 100 | (if buf 101 | (if (setq win (get-buffer-window buf)) 102 | (select-window win) 103 | (switch-to-buffer buf)) 104 | (navi2ch-article-view-article board article))) 105 | ((eq exit 'navi2ch-board-mode) 106 | (setq buf (get-buffer navi2ch-board-buffer-name)) 107 | (if buf 108 | (if (setq win (get-buffer-window buf)) 109 | (select-window win) 110 | (switch-to-buffer buf)) 111 | (navi2ch-bm-select-board board))) 112 | ((eq exit 'navi2ch-list-mode) 113 | (setq buf (get-buffer navi2ch-list-buffer-name)) 114 | (if buf 115 | (if (setq win (get-buffer-window buf)) 116 | (select-window win) 117 | (switch-to-buffer buf)) 118 | (navi2ch-list)))) 119 | (navi2ch-head-kill-buffer))) 120 | 121 | (defun navi2ch-head-select-current-w3m-link (&optional browse-p) 122 | "Emacs-w3m $B$N%j%s%/$r(B navi2ch $B$r;H$C$F$?$I$k!#(B" 123 | (interactive "P") 124 | (let ((url (get-text-property (point) 'w3m-href-anchor))) 125 | (if url 126 | (if (and (navi2ch-2ch-url-p url) 127 | (or (navi2ch-board-url-to-board url) 128 | (navi2ch-article-url-to-article url)) 129 | (not browse-p)) 130 | (navi2ch-goto-url url) 131 | (navi2ch-browse-url-internal url)) 132 | (message "No URL at point")))) 133 | 134 | (defun navi2ch-head-set-mode-line () 135 | (setq navi2ch-mode-line-identification 136 | (format "[%s]" (cdr (assq 'name navi2ch-head-current-board)))) 137 | (navi2ch-set-mode-line-identification)) 138 | 139 | ;; Entry points from navi2ch-{article,board,list}-mode 140 | 141 | (define-key navi2ch-article-mode-map "H" 'navi2ch-head-get-head-txt) 142 | (define-key navi2ch-board-mode-map "H" 'navi2ch-head-get-head-txt) 143 | (define-key navi2ch-list-mode-map "H" 'navi2ch-head-get-head-txt) 144 | 145 | (defun navi2ch-head-get-head-txt (&optional force) 146 | "$B%m!<%+%k%k!<%k$r;}$C$F$-$FI=<(!#(Bhead.txt $B$KJ]B8$7$A$c$&$h!#(B 147 | emacs-w3m $B$,$"$l$P(B w3m $B$GI=<($7$^$D!#(B" 148 | (interactive "P") 149 | (cond ((eq major-mode 'navi2ch-article-mode) 150 | (setq navi2ch-head-current-board navi2ch-article-current-board 151 | navi2ch-head-current-article navi2ch-article-current-article)) 152 | ((eq major-mode 'navi2ch-board-mode) 153 | (setq navi2ch-head-current-board navi2ch-board-current-board 154 | navi2ch-head-current-article nil)) 155 | ((eq major-mode 'navi2ch-list-mode) 156 | (setq navi2ch-head-current-board 157 | (get-text-property (navi2ch-line-beginning-position) 'board) 158 | navi2ch-head-current-article nil) 159 | (unless (eq (cdr (assq 'type navi2ch-head-current-board)) 'board) 160 | (setq navi2ch-head-current-board nil)))) 161 | (unless (or navi2ch-head-current-board navi2ch-head-current-article) 162 | (error "Cannot get local rule here")) 163 | (let* ((navi2ch-net-force-update (or navi2ch-net-force-update force)) 164 | (board navi2ch-head-current-board) 165 | (uri (navi2ch-board-get-url board navi2ch-head-file-name)) 166 | (file (navi2ch-board-get-file-name board navi2ch-head-file-name)) 167 | (exit major-mode) 168 | (win (or (get-buffer-window navi2ch-head-buffer-name) 169 | (and (navi2ch-article-current-buffer) 170 | (get-buffer-window (navi2ch-article-current-buffer))) 171 | (get-buffer-window navi2ch-board-buffer-name))) 172 | time header) 173 | (unless (or navi2ch-offline 174 | ;; navi2ch-multibbs-head-update $BI,MW!)(B 175 | (eq (navi2ch-multibbs-get-bbstype board) 'localfile)) 176 | (setq time (navi2ch-head-load-time)) 177 | (setq header (navi2ch-net-update-file uri file time)) 178 | (setq time (and (not (navi2ch-net-get-state 'not-updated header)) 179 | (not (navi2ch-net-get-state 'error header)) 180 | (or (cdr (assq 'last-modified header)) 181 | (cdr (assq 'date header))))) 182 | (when time (navi2ch-head-save-time time))) 183 | (when win (select-window win)) 184 | (set-buffer (get-buffer-create navi2ch-head-buffer-name)) 185 | (navi2ch-head-mode) 186 | (let ((buffer-read-only nil)) 187 | (erase-buffer) 188 | (when (file-exists-p file) 189 | (navi2ch-insert-file-contents file)) 190 | (if (eq (point-max) (point-min)) 191 | (insert "'H'$B$r2!$9!#(B\n" 192 | " $B"-(B\n" 193 | "$BHD%m!<%+%k%k!<%k$r8+$k!#(B\n" 194 | " $B"-(B\n" 195 | "$BHD%m!<%+%k%k!<%k$O$J$$(B!\n" 196 | " $B"-(B\n" 197 | "((I_$B'U(I_(B)(IO<^3O0(B\n") 198 | (when (locate-library "w3m") 199 | (require 'w3m) 200 | (w3m-region (point-min) (point-max) uri) 201 | (w3m-minor-mode 1))) 202 | (goto-char (point-min)) 203 | (put-text-property (point) (1+ (point)) 'navi2ch-head-exit exit) 204 | (set-buffer-modified-p nil)) 205 | (switch-to-buffer (current-buffer)) 206 | (navi2ch-head-set-mode-line))) 207 | 208 | (run-hooks 'navi2ch-head-load-hook) 209 | ;;; navi2ch-head.el ends here 210 | -------------------------------------------------------------------------------- /contrib/navi2ch-logo.el: -------------------------------------------------------------------------------- 1 | ;;; navi2ch-logo.el --- Inline logo module for navi2ch 2 | 3 | ;; Copyright (C) 2002 by navi2ch Project 4 | 5 | ;; Author: 6 | ;; (not 1) 7 | ;; http://pc.2ch.net/test/read.cgi/unix/999166513/895 $B$NL>L5$7$5$s(B 8 | ;; Keywords: 2ch, network 9 | 10 | ;; This file is free software; you can redistribute it and/or modify 11 | ;; it under the terms of the GNU General Public License as published by 12 | ;; the Free Software Foundation; either version 2, or (at your option) 13 | ;; any later version. 14 | 15 | ;; This file is distributed in the hope that it will be useful, 16 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | ;; GNU General Public License for more details. 19 | 20 | ;; You should have received a copy of the GNU General Public License 21 | ;; along with GNU Emacs; see the file COPYING. If not, write to 22 | ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 23 | ;; Boston, MA 02111-1307, USA. 24 | 25 | ;;; Commentary: 26 | ;; $B%l%90lMw$N@hF,$K$=$NHD$N%m%4$rE=$j$D$1$k!#(B 27 | ;; 28 | ;; Emacs 21 $B$J$i(B navi2ch-logo.elc? $B$K(B load-path $B$rDL$7$F$3$&$7$k!*(B 29 | ;; 30 | ;; (require 'navi2ch-logo) 31 | ;; (add-hook 'navi2ch-hook 'navi2ch-logo-init) 32 | ;; 33 | ;; $B$$$^$N$H$3$m30It%W%m%0%i%`(B `gifsicle' $B$H(B `convert' $B$,I,?\!#(B 34 | ;; 35 | ;; gifsicle $B$O%"%K%a!<%7%g%s(B GIF $B$NHs%"%K%a!<%7%g%s2=$K;H$&!#(B 36 | ;; convert $B$O3F$5$J$/$A$c!#(B 38 | ;; 39 | ;; $BHD0lMw$NFI$_9~$_$O!"%m%4$r;}$C$F$/$k$V$sEvA3CY$/$J$k!#(B 40 | ;; $B%U%!%$%k$K$J$k(B") 57 | (defvar navi2ch-logo-temp-name-prefix "img-" 58 | "$B%F%s%]%i%j%U%!%$%k$N%5%U%#%C%/%9!#(B") 59 | (defvar navi2ch-logo-image-alist nil 60 | "\`($BHD$N(Bid $B$=$NHD$N%m%4$N(Bimage)\' $B$+$i$J$k(B alist$B!#(B 61 | $B$$$A$I(B create-image $B$7$?2hA|$O$3$3$KDI2C$7$F:FMxMQ$9$k!#(B") 62 | (defvar navi2ch-logo-previous-image nil) 63 | 64 | (defun navi2ch-logo-init () 65 | "navi2ch-logo $B$r=i4|2=$7$F;H$($k$h$&$K$9$k!#(B" 66 | (when (and navi2ch-on-emacs21 (not navi2ch-logo-temp-directory)) 67 | (setq navi2ch-logo-temp-directory 68 | (file-name-as-directory 69 | (make-temp-file navi2ch-logo-temp-directory-prefix t))) 70 | (add-hook 'navi2ch-exit-hook 'navi2ch-logo-cleanup) 71 | (add-hook 'navi2ch-bm-select-board-hook 'navi2ch-logo-update) 72 | (add-hook 'navi2ch-board-after-sync-hook 'navi2ch-logo-update))) 73 | 74 | (defun navi2ch-logo-cleanup () 75 | "$B%F%s%]%i%j%U%!%$%k$N8e;OKv$J$I$r$7$F!"JQ?t$r=i4|CM$KLa$9!#(B" 76 | (when (and navi2ch-logo-temp-directory 77 | (file-directory-p navi2ch-logo-temp-directory)) 78 | (dolist (file (directory-files navi2ch-logo-temp-directory t)) 79 | (and (file-regular-p file) 80 | (delete-file file))) 81 | (delete-directory navi2ch-logo-temp-directory)) 82 | (setq navi2ch-logo-temp-directory nil 83 | navi2ch-logo-image-alist nil)) 84 | 85 | (defun navi2ch-logo-update () 86 | "`navi2ch-board-mode' $B$GF0:n$7!"%m%4$rFI$_9~$s$G%P%C%U%!>eIt$KE=$jIU$1$k!#(B 87 | `navi2ch-board-select-board-hook' $B$+$i8F$P$l$k!#(B" 88 | (if (eq major-mode 'navi2ch-board-mode) 89 | (let* ((id (cdr (assq 'id navi2ch-board-current-board))) 90 | (image (cdr (assoc id navi2ch-logo-image-alist)))) 91 | (if (eq image t) 92 | (navi2ch-logo-remove-image (point-min)) 93 | (when (and (not image) (not navi2ch-offline)) 94 | (condition-case err 95 | (catch 'quit 96 | (setq image (navi2ch-logo-create-logo-image))) 97 | (t nil)) 98 | (setq navi2ch-logo-image-alist 99 | (navi2ch-put-alist id (or image t) navi2ch-logo-image-alist))) 100 | (when (and image (not (eq image navi2ch-logo-previous-image))) 101 | (navi2ch-logo-remove-image (point-min)) 102 | (navi2ch-logo-put-image (point-min) image) 103 | (setq navi2ch-logo-previous-image image)))) 104 | (navi2ch-logo-remove-image (point-min)))) 105 | 106 | (defun navi2ch-logo-put-image (point image) 107 | "POINT $B0LCV$K(B IMAGE $B$rE=$jIU$1$k!#(B 108 | 109 | IMAGE $B$rD>@\%P%C%U%!%F%-%9%H$N(B display property $B$K$9$k$N$O%^%:$$!#(B 110 | $B$J$<$J$i$3$N2hA|$OJ8;z$H$OFHN)$7$?$b$N$@$+$i!#(B 111 | 112 | $B$=$3$G!"(B 113 | (1) $B$^$:(B POINT $B0LCV$KD9$5(B 0 $B$N%*!<%P!<%l%$$r:n$k(B 114 | (2) $BE,Ev$JJ8;zNs$N(B text property ($B$N(B `display' property) $B$K(B IMAGE $B$r(B 115 | $B;XDj$7$F!"%F%-%9%H$H$7$F07$($k$h$&$K$9$k(B 116 | (3) (1) $B$G:n$C$?%*!<%P!<%l%$$N(B `before-string' $BB0@-$K!"(B(2) $B$NJ8;zNs$r(B 117 | $B;XDj$9$k(B 118 | $B$H$$$&e$X$N%]%$%s%H0\F0$r6X;_!#(B 124 | (overlay-put overlay 'intangible t) 125 | 126 | ;; `face' $B$K(B `default' $B$r;XDj$7$F!"6a$/$NJ8;z$N%F%-%9%H(B 127 | ;; $B%W%m%Q%F%#$N(B underline $B$d(B stroke $B$N1F6A$rGS=|!#(B 128 | (overlay-put overlay 'face 'default) 129 | 130 | ;; navi2ch-logo $B$,:n$C$?$H$$$&$3$H$,$o$+$k$h$&$K!#(B 131 | (overlay-put overlay 'navi2ch-logo t) 132 | 133 | (overlay-put overlay 'before-string str))) 134 | 135 | (defun navi2ch-logo-remove-image (&optional point) 136 | "`navi2ch-logo-put-image' $B$,CV$$$?2hA|$r(B POINT $B0LCV$+$i>C$9!#(B 137 | $B>C$9$Y$-2hA|$,$J$1$l$P2?$b$7$J$$!#(B" 138 | (unless point 139 | (setq point (point-min))) 140 | (let ((ls (overlays-in point point)) 141 | overlay) 142 | (while (and ls (not overlay)) 143 | (when (overlay-get (car ls) 'navi2ch-logo) 144 | (setq overlay (car ls))) 145 | (setq ls (cdr ls))) 146 | (when overlay 147 | (delete-overlay overlay)))) 148 | 149 | (defun navi2ch-logo-create-logo-image () 150 | "$B%m%4$r%@%&%s%m!<%I$7$F(B `create-image' $B$7$?7k2L$rJV$9!#(B 151 | 152 | $B30It%W%m%0%i%`(B \`gifsicle\' $B$O%"%K%a!<%7%g%s(B GIF $B$rHs%"%K%a2=(B 153 | $B$9$k$?$a$K;H$&!#(B\`convert\' $B$O2hA|$r0lN'$K(B XPM $B$KJQ49$9$k$?$a$K;H$C$F$k!#(B 154 | 155 | Emacs $B$O(B XPM $B0J30$b$b$A$m$s%5%]!<%H$7$F$k$+$i!"K\Mh$OA4It(B XPM $B$K(B 156 | $B$9$k$3$H$O$J$$!#(B`image-types' $B$r;2>H$9$k$J$j(B `create-image' $B$N(B 157 | $BJV$jCM$r8+$k$J$j$7$F!"30It%W%m%0%i%`$N5/F0$OI,MW:G>/8B$K$H$I$a$?(B 158 | $B$[$&$,$$$$!#(B" 159 | (let ((logo-file (navi2ch-net-download-logo navi2ch-board-current-board)) 160 | (xpm-file (concat navi2ch-logo-temp-directory 161 | (make-temp-name navi2ch-logo-temp-name-prefix) 162 | ".xpm")) 163 | temp-file) 164 | (unless logo-file (throw 'quit nil)) 165 | (when (string-match "\\.gif$" logo-file) 166 | (setq temp-file (concat navi2ch-logo-temp-directory 167 | (make-temp-name navi2ch-logo-temp-name-prefix) 168 | ".gif")) 169 | (when (/= 0 (call-process "gifsicle" logo-file nil nil 170 | "#-1" "--output" temp-file)) 171 | (throw 'quit nil)) 172 | (setq logo-file temp-file)) 173 | (when (/= 0 (call-process "convert" nil nil nil 174 | "-border" "1x1" 175 | "-bordercolor" "black" 176 | logo-file xpm-file)) 177 | (throw 'quit nil)) 178 | (if temp-file (delete-file temp-file)) 179 | (create-image xpm-file 'xpm))) 180 | 181 | ;;; navi2ch-logo.el ends here 182 | -------------------------------------------------------------------------------- /contrib/ChangeLog: -------------------------------------------------------------------------------- 1 | 2004-12-30 SAITO Takuya 2 | 3 | * izonmoji-mode.el (izonmoji-mode-on): 4 | buffer-display-table $B$r>e=q$-$7$J$$$h$&$K!#(B 5 | http://pc5.2ch.net/test/read.cgi/unix/1085940686/876 6 | 7 | 2004-10-10 mami 8 | 9 | * navi2ch-js-livedoor-move.el (navi2ch-js-livedoor-move): 10 | jbbs.livedoor.com $B$+$i(B jbbs.livedoor.jp $B$X$N0\E>MQ$KJQ99!#(B 11 | $B%[%9%HL>$r4X?t$N:G=i$K0\F0!#(B 12 | 13 | 2004-08-15 mami 14 | 15 | * navi2ch-js-livedoor-move.el: (provide ...) $B$r@hF,$K!#(B 16 | (require ...) $B$rDI2C!#(B 17 | 18 | 2004-08-15 mami 19 | 20 | * Makefile.am (EXTRA_DIST): navi2ch-js-livedoor-move.el $B$rDI2C!#(B 21 | 22 | * navi2ch-js-livedoor-move.el (navi2ch-js-livedoor-move): $B?7%U%!%$(B 23 | $B%k!#(B 24 | 25 | 2004-06-05 mami 26 | 27 | * navi2ch-logo.el (navi2ch-logo-update): APEL $B$N(B put-alist $B$r;H$o(B 28 | $B$J$$$h$&$K!#(B 29 | http://pc5.2ch.net/test/read.cgi/unix/1085940686/36 30 | 31 | 2004-01-30 mami 32 | 33 | * navi2ch-spamfilter.el: License term $B$r5-=R!#(B 34 | http://pc.2ch.net/test/read.cgi/unix/1065246418/580 35 | http://pc.2ch.net/test/read.cgi/unix/1065246418/638 36 | 37 | 2003-12-21 Nanashi San 38 | 39 | * navi2ch-spamfilter.el (navi2ch-spamf-additional-token-flag): 40 | $B?7JQ?t!#(B 41 | (navi2ch-article-bayesian-tokenizer): $B>e5-JQ?t$,(B non-nil $B$N>l9g(B 42 | $B%l%9$NF|;~!"HV9fEy$r%H!<%/%s$H$7$FDI2C$9$k!#(B 43 | 44 | 2003-11-06 Nanashi San 45 | 46 | * navi2ch-spamfilter.el (navi2ch-article-bayesian-tokenizer): $B8=:_(B 47 | $B$N%l%9HV9f$,$o$+$k;~$@$1(B num: $B$rIU$1$k$h$&$K!#(B 48 | http://pc.2ch.net/test/read.cgi/unix/1065246418/264 49 | 50 | 2003-11-04 Nanashi San 51 | 52 | * navi2ch-spamfilter.el (navi2ch-article-before-save-corpus-hook): 53 | $B?7JQ?t!#(B 54 | (navi2ch-article-save-corpus): $B>e5-(B hook $B$r 57 | 58 | * navi2ch-spamfilter.el (toplevel): navi2ch-exit-hook $B$G$O$J$/!"(B 59 | navi2ch-save-status-hook $B$G%3!<%Q%9$rJ]B8$9$k$h$&$K!#(B 60 | http://pc.2ch.net/test/read.cgi/unix/1065246418/136 61 | 62 | * navi2ch-spamfilter.el: spamfilter.el 0.11 $B$KBP1~!#(B 63 | http://pc.2ch.net/test/read.cgi/unix/1065246418/130 64 | 65 | 2003-10-13 Nanashi San 66 | 67 | spamfilter.el 0.10 $B$KBP1~!#%3!<%Q%9%U%!%$%k$N%U%)!<%^%C%H$,(B 68 | $BJQ99$K$J$C$F$^$9$N$G3F<+JQ49$7$F$/$@$5$$!#(B 69 | http://pc.2ch.net/test/read.cgi/unix/1065246418/95 70 | * navi2ch-spamfilter.el (navi2ch-spamf-preferred-major): $B?7JQ?t!#(B 71 | (navi2ch-spamf-preferred-minor): $B?7JQ?t!#(B 72 | (toplevel): $B>e5-JQ?t$K1~$8$F(B spamf-cvs-id $B$r%A%'%C%/!#(B 73 | (navi2ch-spamf-good-corpus): spamfilter 0.10 $B$KBP1~!#(B 74 | (navi2ch-spamf-bad-corpus): $BF1>e!#(B 75 | (navi2ch-article-spam-probability): $BF1>e!#(B 76 | (navi2ch-article-show-spam-probability): $BF1>e!#(B 77 | (navi2ch-article-save-corpus): $BF1>e!#(B 78 | (navi2ch-article-load-corpus): $BF1>e!#(B 79 | 80 | 2003-10-12 Nanashi San 81 | 82 | * navi2ch-spamfilter.el (navi2ch-spamf-good-corpus): $B?7JQ?t!#(B 83 | (navi2ch-spamf-bad-corpus): $B?7JQ?t!#(B 84 | (navi2ch-spamf-register-good-token): $B>e5-JQ?t$r;H$&$h$&$K!#(B 85 | (navi2ch-spamf-register-spam-token): $BF1>e!#(B 86 | (navi2ch-spamf-register-good-token-list): $BF1>e!#(B 87 | (navi2ch-spamf-register-spam-token-list): $BF1>e!#(B 88 | (navi2ch-article-save-corpus): $BF1>e!#(B 89 | (navi2ch-article-load-corpus): $BF1>e!#(B 90 | (navi2ch-article-spam-probability): $BF1>e!#(B 91 | (navi2ch-article-show-spam-probability): $BF1>e!#(B 92 | 93 | 2003-10-12 Nanashi San 94 | 95 | * navi2ch-spamfilter.el: $B?7%U%!%$%k!#(B 96 | 97 | * Makefile.am (EXTRA_DIST): $B>e5-$rDI2C!#(B 98 | 99 | * README: $BF1>e!#(B 100 | 101 | 2003-07-16 mami 102 | 103 | * README: Copyright $B99?7!#(B 104 | 105 | * izonmoji-mode.el: $BF1>e!#(B 106 | 107 | 2003-02-22 SAITO Takuya 108 | 109 | * izonmoji-mode.el (toplevel): Commentary $B$K(B JISX0213$BMQ$N%U%)%s%H(B 110 | $B$,I,MW$G$"$k$3$H$rDI2C!#(B 111 | 112 | 2003-02-02 SAITO Takuya 113 | 114 | * izonmoji-mode.el (toplevel): izonmoji-shift_jis $B$r(B 115 | izonmoji-shift-jis $B$K2~L>!#(B 116 | 117 | 2003-01-27 mami 118 | 119 | * navi2ch-pizaunix.el: $B?7%U%!%$%k!#(B 120 | 121 | * Makefile.am (EXTRA_DIST): $B>e5-$rDI2C!#(B 122 | 123 | * README: $BF1>e!#(B 124 | 125 | 2003-01-21 SAITO Takuya 126 | 127 | * izonmoji-mode.el (toplevel): Wanderlust $B$N@_DjNc$rDI2C(B 128 | http://pc.2ch.net/test/read.cgi/unix/1039935998/314 129 | (izonmoji-mac-display-list): $B=D=q$-MQ$NJ8;z$rDI2C(B 130 | (izonmoji-mac-chars-list): $BF1>e!#(B 131 | (toplevel): izonmoji-shift_jis $B$rDj5A!#(B 132 | 133 | 2002-12-16 Nanashi San 134 | 135 | * Makefile.am (EXTRA_DIST): izonmoji-mode.el$B!"(B 136 | navi2ch-track-mouse.el $B$rDI2C!#%"%k%U%!%Y%C%H=g$K(B sort$B!#(B 137 | 138 | 2002-11-17 SAITO Takuya 139 | 140 | * izonmoji-mode.el (izonmoji-mode-on): XEmacs-21.1 $B$G$O!"%U%'%$%9$r(B 141 | $BIU$1$J$$$h$&$K!#(B http://pc.2ch.net/test/read.cgi/unix/1031231315/772 142 | (izonmoji-win-face): XEmacs-21.1 $B$G$O%U%'%$%9$rIU$1$J$$$3$H$r(B 143 | docstring $B$KDI2C!#(B 144 | (izonmoji-mac-face): $BF1>e!#(B 145 | 146 | 2002-11-11 SAITO Takuya 147 | 148 | * izonmoji-mode.el (izonmoji-mode-on): XEmacs $B$G$b(B 149 | izonmoji-{win,mac}-face $B$r;H$&$h$&$K!#(B 150 | 151 | * navi2ch-migemo.el (toplevel): euc-jp $B$+$i(B iso-2022-jp $B$K!#(B 152 | 153 | 2002-10-26 SAITO Takuya 154 | 155 | * izonmoji-mode.el (toplevel): $B@_DjNc$K(B 156 | navi2ch-popup-article-mode-hook $B$rDI2C!#(B 157 | 158 | 2002-10-09 SAITO Takuya 159 | 160 | * navi2ch-jisx0213.el: $B:o=|!#(B 161 | 162 | * izonmoji-mode.el: $B?7%U%!%$%k!#(B 163 | 164 | * README: navi2ch-jisx0213.el -> izonmoji-mode.el $B$K!#(B 165 | 166 | 2002-10-06 Taiki SUGAWARA 167 | 168 | * README: navi2ch-jisx0213 $B$N(B typo $B$r=$@5!#(B 169 | 170 | 2002-10-02 Taiki SUGAWARA 171 | 172 | * navi2ch-jisx0213.el: XEmacs $B$KBP1~!#(B 173 | 174 | * README: navi2ch-jisx0213 $B$K$D$$$F$N5-=R$rDI2C!#(B 175 | 176 | 2002-10-01 Taiki SUGAWARA 177 | 178 | * README: $B$A$g$$$H5-=R$rDI2C!#(B 179 | 180 | * navi2ch-jisx0213.el: $B?7%U%!%$%k!#(B 181 | 182 | * gikope.el (toplevel): cl $B$r(B require $B$9$k$h$&$K!#(B 183 | 184 | 2002-10-01 Taiki SUGAWARA 185 | 186 | $B$$$m$$$mDI2C$7$?$N$G!"E,Ev$K!#(B 187 | * gikope.el (gikope-list-*): AA $B$NL>A00lMwI=<(!"A*Br%b!<%IMQ$N$"$l$3$l!#(B 188 | (gikope-view-*): AA $BI=<(MQ%b!<%I$N$"$l$3$l!#(B 189 | (gikope): $B?7%3%^%s%I!#%.%3%Z%b!<%I$KF~$k!#(B 190 | $BB>$K$b4{B8$N4X?t$r>/$7$7$7$?$j$H$+!#(B 191 | 192 | 2002-07-11 Nanashi San 193 | 194 | * README: $B?7%U%!%$%k!#3F%U%!%$%k$N4JC1$J@bL@!#(B 195 | 196 | * navi2ch-track-mouse.el: $B?7%U%!%$%k!#(B 197 | 198 | 2002-07-03 Nanashi San 199 | 200 | * gikope.el (gikope-aa-buffer): $B%P%C%U%!L>$KJQ99!#(B 201 | (gikope-parse-aa): find-file-noselect-as-coding-system $B$r;H$o$J$$(B 202 | $B$h$&$K!#(B 203 | http://pc.2ch.net/test/read.cgi/unix/1023884490/285 $B$rEv$F$?!#(B 204 | 205 | 2002-06-29 Nanashi San 206 | 207 | * navi2ch-migemo.el (toplevel): $B%P%$%H%3%s%Q%$%k;~$K(B migemo $B$,I,MW(B 208 | $BL5$$$h$&$K!"(B(require 'migemo) $B$r(B eval $B$G0O$s$@!#(B 209 | 210 | 2002-06-28 Nanashi San 211 | 212 | * Makefile.am (EXTRA_DIST): navi2ch-migemo.el $B$rDI2C!#(B 213 | 214 | 2002-02-05 NOKUBI Takatsugu 215 | 216 | * Makefile.am (EXTRA_DIST): gikope.el $BDI2C!#(B 217 | 218 | 2002-01-06 Taiki SUGAWARA 219 | 220 | * navi2ch-logo.el: $B%U%!%$%kDI2C!#%l%90lMw$N@hF,$K%m%4$rD%$k!#(B 221 | http://pc.2ch.net/test/read.cgi/unix/999166513/895 222 | 223 | $Id$ 224 | -------------------------------------------------------------------------------- /contrib/Makefile.in: -------------------------------------------------------------------------------- 1 | # Makefile.in generated by automake 1.9.6 from Makefile.am. 2 | # @configure_input@ 3 | 4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 5 | # 2003, 2004, 2005 Free Software Foundation, Inc. 6 | # This Makefile.in is free software; the Free Software Foundation 7 | # gives unlimited permission to copy and/or distribute it, 8 | # with or without modifications, as long as this notice is preserved. 9 | 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without 12 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 13 | # PARTICULAR PURPOSE. 14 | 15 | @SET_MAKE@ 16 | srcdir = @srcdir@ 17 | top_srcdir = @top_srcdir@ 18 | VPATH = @srcdir@ 19 | pkgdatadir = $(datadir)/@PACKAGE@ 20 | pkglibdir = $(libdir)/@PACKAGE@ 21 | pkgincludedir = $(includedir)/@PACKAGE@ 22 | top_builddir = .. 23 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 24 | INSTALL = @INSTALL@ 25 | install_sh_DATA = $(install_sh) -c -m 644 26 | install_sh_PROGRAM = $(install_sh) -c 27 | install_sh_SCRIPT = $(install_sh) -c 28 | INSTALL_HEADER = $(INSTALL_DATA) 29 | transform = $(program_transform_name) 30 | NORMAL_INSTALL = : 31 | PRE_INSTALL = : 32 | POST_INSTALL = : 33 | NORMAL_UNINSTALL = : 34 | PRE_UNINSTALL = : 35 | POST_UNINSTALL = : 36 | subdir = contrib 37 | DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ 38 | ChangeLog 39 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 40 | am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ 41 | $(top_srcdir)/configure.in 42 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 43 | $(ACLOCAL_M4) 44 | mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs 45 | CONFIG_CLEAN_FILES = 46 | SOURCES = 47 | DIST_SOURCES = 48 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 49 | ACLOCAL = @ACLOCAL@ 50 | AMTAR = @AMTAR@ 51 | AUTOCONF = @AUTOCONF@ 52 | AUTOHEADER = @AUTOHEADER@ 53 | AUTOMAKE = @AUTOMAKE@ 54 | AWK = @AWK@ 55 | CYGPATH_W = @CYGPATH_W@ 56 | DEFS = @DEFS@ 57 | ECHO_C = @ECHO_C@ 58 | ECHO_N = @ECHO_N@ 59 | ECHO_T = @ECHO_T@ 60 | EMACS = @EMACS@ 61 | EMACSLOADPATH = @EMACSLOADPATH@ 62 | INSTALL_DATA = @INSTALL_DATA@ 63 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ 64 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ 65 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ 66 | LIBOBJS = @LIBOBJS@ 67 | LIBS = @LIBS@ 68 | LTLIBOBJS = @LTLIBOBJS@ 69 | MAINT = @MAINT@ 70 | MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ 71 | MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ 72 | MAKEINFO = @MAKEINFO@ 73 | PACKAGE = @PACKAGE@ 74 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ 75 | PACKAGE_NAME = @PACKAGE_NAME@ 76 | PACKAGE_STRING = @PACKAGE_STRING@ 77 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ 78 | PACKAGE_URL = @PACKAGE_URL@ 79 | PACKAGE_VERSION = @PACKAGE_VERSION@ 80 | PATH_SEPARATOR = @PATH_SEPARATOR@ 81 | SET_MAKE = @SET_MAKE@ 82 | SHELL = @SHELL@ 83 | STRIP = @STRIP@ 84 | VERSION = @VERSION@ 85 | am__leading_dot = @am__leading_dot@ 86 | am__tar = @am__tar@ 87 | am__untar = @am__untar@ 88 | bindir = @bindir@ 89 | build_alias = @build_alias@ 90 | datadir = @datadir@ 91 | datarootdir = @datarootdir@ 92 | docdir = @docdir@ 93 | dvidir = @dvidir@ 94 | exec_prefix = @exec_prefix@ 95 | host_alias = @host_alias@ 96 | htmldir = @htmldir@ 97 | icondir = @icondir@ 98 | includedir = @includedir@ 99 | infodir = @infodir@ 100 | install_sh = @install_sh@ 101 | libdir = @libdir@ 102 | libexecdir = @libexecdir@ 103 | lispdir = @lispdir@ 104 | localedir = @localedir@ 105 | localstatedir = @localstatedir@ 106 | mandir = @mandir@ 107 | mkdir_p = @mkdir_p@ 108 | oldincludedir = @oldincludedir@ 109 | packagedir = @packagedir@ 110 | pdfdir = @pdfdir@ 111 | prefix = @prefix@ 112 | program_transform_name = @program_transform_name@ 113 | psdir = @psdir@ 114 | sbindir = @sbindir@ 115 | sharedstatedir = @sharedstatedir@ 116 | sysconfdir = @sysconfdir@ 117 | target_alias = @target_alias@ 118 | EXTRA_DIST = gikope.el izonmoji-mode.el navi2ch-logo.el \ 119 | navi2ch-migemo.el navi2ch-pizaunix.el navi2ch-spamfilter.el \ 120 | navi2ch-track-mouse.el navi2ch-js-livedoor-move.el 121 | 122 | all: all-am 123 | 124 | .SUFFIXES: 125 | $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) 126 | @for dep in $?; do \ 127 | case '$(am__configure_deps)' in \ 128 | *$$dep*) \ 129 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ 130 | && exit 0; \ 131 | exit 1;; \ 132 | esac; \ 133 | done; \ 134 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu contrib/Makefile'; \ 135 | cd $(top_srcdir) && \ 136 | $(AUTOMAKE) --gnu contrib/Makefile 137 | .PRECIOUS: Makefile 138 | 139 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) 140 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 141 | 142 | $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 143 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 144 | $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) 145 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 146 | uninstall-info-am: 147 | tags: TAGS 148 | TAGS: 149 | 150 | ctags: CTAGS 151 | CTAGS: 152 | 153 | 154 | distdir: $(DISTFILES) 155 | @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ 156 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ 157 | list='$(DISTFILES)'; for file in $$list; do \ 158 | case $$file in \ 159 | $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ 160 | $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ 161 | esac; \ 162 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ 163 | dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ 164 | if test "$$dir" != "$$file" && test "$$dir" != "."; then \ 165 | dir="/$$dir"; \ 166 | $(mkdir_p) "$(distdir)$$dir"; \ 167 | else \ 168 | dir=''; \ 169 | fi; \ 170 | if test -d $$d/$$file; then \ 171 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ 172 | cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ 173 | fi; \ 174 | cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ 175 | else \ 176 | test -f $(distdir)/$$file \ 177 | || cp -p $$d/$$file $(distdir)/$$file \ 178 | || exit 1; \ 179 | fi; \ 180 | done 181 | check-am: all-am 182 | check: check-am 183 | all-am: Makefile 184 | installdirs: 185 | install: install-am 186 | install-exec: install-exec-am 187 | install-data: install-data-am 188 | uninstall: uninstall-am 189 | 190 | install-am: all-am 191 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am 192 | 193 | installcheck: installcheck-am 194 | install-strip: 195 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 196 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 197 | `test -z '$(STRIP)' || \ 198 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install 199 | mostlyclean-generic: 200 | 201 | clean-generic: 202 | 203 | distclean-generic: 204 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) 205 | 206 | maintainer-clean-generic: 207 | @echo "This command is intended for maintainers to use" 208 | @echo "it deletes files that may require special tools to rebuild." 209 | clean: clean-am 210 | 211 | clean-am: clean-generic mostlyclean-am 212 | 213 | distclean: distclean-am 214 | -rm -f Makefile 215 | distclean-am: clean-am distclean-generic 216 | 217 | dvi: dvi-am 218 | 219 | dvi-am: 220 | 221 | html: html-am 222 | 223 | info: info-am 224 | 225 | info-am: 226 | 227 | install-data-am: 228 | 229 | install-exec-am: 230 | 231 | install-info: install-info-am 232 | 233 | install-man: 234 | 235 | installcheck-am: 236 | 237 | maintainer-clean: maintainer-clean-am 238 | -rm -f Makefile 239 | maintainer-clean-am: distclean-am maintainer-clean-generic 240 | 241 | mostlyclean: mostlyclean-am 242 | 243 | mostlyclean-am: mostlyclean-generic 244 | 245 | pdf: pdf-am 246 | 247 | pdf-am: 248 | 249 | ps: ps-am 250 | 251 | ps-am: 252 | 253 | uninstall-am: uninstall-info-am 254 | 255 | .PHONY: all all-am check check-am clean clean-generic distclean \ 256 | distclean-generic distdir dvi dvi-am html html-am info info-am \ 257 | install install-am install-data install-data-am install-exec \ 258 | install-exec-am install-info install-info-am install-man \ 259 | install-strip installcheck installcheck-am installdirs \ 260 | maintainer-clean maintainer-clean-generic mostlyclean \ 261 | mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ 262 | uninstall-info-am 263 | 264 | 265 | all: 266 | 267 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 268 | cd $(top_builddir) && \ 269 | CONFIG_HEADERS= CONFIG_LINKS= \ 270 | CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status 271 | # Tell versions [3.59,3.63) of GNU make to not export all variables. 272 | # Otherwise a system limit (for SysV at least) may be exceeded. 273 | .NOEXPORT: 274 | -------------------------------------------------------------------------------- /navi2ch-history.el: -------------------------------------------------------------------------------- 1 | ;;; navi2ch-history.el --- global history module for navi2ch -*- coding: iso-2022-7bit; -*- 2 | 3 | ;; Copyright (C) 2001, 2002, 2003, 2004, 2006, 2008 by Navi2ch Project 4 | 5 | ;; Author: Taiki SUGAWARA 6 | ;; Keywords: network, 2ch 7 | 8 | ;; This file is free software; you can redistribute it and/or modify 9 | ;; it under the terms of the GNU General Public License as published by 10 | ;; the Free Software Foundation; either version 2, or (at your option) 11 | ;; any later version. 12 | 13 | ;; This file is distributed in the hope that it will be useful, 14 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | ;; GNU General Public License for more details. 17 | 18 | ;; You should have received a copy of the GNU General Public License 19 | ;; along with GNU Emacs; see the file COPYING. If not, write to 20 | ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 21 | ;; Boston, MA 02111-1307, USA. 22 | 23 | ;;; Commentary: 24 | 25 | ;; 26 | 27 | ;;; Code: 28 | (provide 'navi2ch-history) 29 | (defconst navi2ch-history-ident 30 | "$Id$") 31 | 32 | (eval-when-compile (require 'cl)) 33 | 34 | (require 'navi2ch) 35 | 36 | (defvar navi2ch-history-mode-map nil) 37 | (unless navi2ch-history-mode-map 38 | (let ((map (make-sparse-keymap))) 39 | (set-keymap-parent map navi2ch-bm-mode-map) 40 | ;; (define-key map "q" 'navi2ch-history-exit) 41 | (define-key map "\C-k" 'navi2ch-history-cut) 42 | (define-key map "\C-y" 'navi2ch-history-yank) 43 | (define-key map "d" 'navi2ch-history-cut) 44 | (define-key map "D" 'navi2ch-history-delete) 45 | (define-key map "md" 'navi2ch-history-cut-mark-article) 46 | (define-key map "mD" 'navi2ch-history-delete-mark-article) 47 | (define-key map "s" 'navi2ch-history-sync) 48 | (setq navi2ch-history-mode-map map))) 49 | 50 | (defvar navi2ch-history-mode-menu-spec 51 | (navi2ch-bm-make-menu-spec 52 | "History" 53 | nil)) 54 | 55 | (defvar navi2ch-history-alist nil 56 | "history $B$rI=$9O"A[%j%9%H!#(B 57 | '((key board article) ...) $B$H$$$&7A$r$7$F$$$k!#(B 58 | key $B$O(B (concat uri artid)$B!#(B") 59 | (defvar navi2ch-history-buffer-name "*navi2ch history*") 60 | 61 | (defvar navi2ch-history-board 62 | '((name . "$BMzNr(B") 63 | (type . history) 64 | (id . "#hist"))) 65 | (defvar navi2ch-history-cut-stack nil) 66 | 67 | ;;; navi2ch-bm callbacks 68 | (defun navi2ch-history-set-property (begin end item) 69 | (put-text-property begin end 'item item)) 70 | 71 | (defun navi2ch-history-get-property (point) 72 | (get-text-property (save-excursion (goto-char point) 73 | (beginning-of-line) 74 | (point)) 75 | 'item)) 76 | 77 | (defun navi2ch-history-get-board (item) 78 | (nth 1 (assoc item navi2ch-history-alist))) 79 | 80 | (defun navi2ch-history-get-article (item) 81 | (nth 2 (assoc item navi2ch-history-alist))) 82 | 83 | (defun navi2ch-history-exit () 84 | (run-hooks 'navi2ch-history-exit-hook)) 85 | 86 | ;; regist board 87 | (navi2ch-bm-regist-board 'history 'navi2ch-history 88 | navi2ch-history-board) 89 | 90 | ;; add hook 91 | (add-hook 'navi2ch-save-status-hook 'navi2ch-history-save-info) 92 | (add-hook 'navi2ch-load-status-hook 'navi2ch-history-load-info) 93 | 94 | ;;; navi2ch-history functions 95 | (defun navi2ch-history-get-key (board article) 96 | (concat (cdr (assq 'uri board)) 97 | (cdr (assq 'artid article)))) 98 | 99 | (defun navi2ch-history-add (board article) 100 | "BOARD $B$H(B ARTICLE $B$GI=$5$l$k(B $B%9%l%C%I$rDI2C!#(B" 101 | (let* ((key (navi2ch-history-get-key board article)) 102 | (article (list (assq 'subject article) 103 | (assq 'artid article))) 104 | (old-node (assoc key navi2ch-history-alist)) 105 | (old-subject (cdr (assq 'subject (nth 2 old-node)))) 106 | (subject (cdr (assq 'subject article)))) 107 | (setq navi2ch-history-alist (delete old-node navi2ch-history-alist)) 108 | (setq navi2ch-history-alist 109 | (cons (if (or subject (not old-subject)) 110 | (list key board article) 111 | old-node) 112 | navi2ch-history-alist))) 113 | (when (and navi2ch-history-max-line 114 | (> (length navi2ch-history-alist) 115 | navi2ch-history-max-line)) 116 | (setcdr (nthcdr (1- navi2ch-history-max-line) 117 | navi2ch-history-alist) 118 | nil))) 119 | 120 | (defun navi2ch-history-insert-subject (num item) 121 | (navi2ch-bm-insert-subject 122 | item num 123 | (or (cdr (assq 'subject (navi2ch-history-get-article item))) 124 | (navi2ch-history-get-key 125 | (navi2ch-history-get-board item) 126 | (navi2ch-history-get-article item))) 127 | (format "[%s]" (cdr (assq 'name (navi2ch-history-get-board item)))))) 128 | 129 | (defun navi2ch-history-insert-subjects () 130 | (let ((i 1)) 131 | (dolist (x navi2ch-history-alist) 132 | (navi2ch-history-insert-subject i (car x)) 133 | (setq i (1+ i))))) 134 | 135 | (defun navi2ch-history (&rest args) 136 | "history $B$rI=<($9$k!#(B" 137 | (navi2ch-history-mode) 138 | (navi2ch-bm-setup 'navi2ch-history) 139 | (navi2ch-history-sync)) 140 | 141 | (defun navi2ch-history-sync () 142 | (interactive) 143 | (let ((buffer-read-only nil)) 144 | (erase-buffer) 145 | (save-excursion 146 | (navi2ch-history-insert-subjects)))) 147 | 148 | (easy-menu-define navi2ch-history-mode-menu 149 | navi2ch-history-mode-map 150 | "Menu used in navi2ch-history" 151 | navi2ch-history-mode-menu-spec) 152 | 153 | (defun navi2ch-history-setup-menu () 154 | (easy-menu-add navi2ch-history-mode-menu)) 155 | 156 | (defun navi2ch-history-mode () 157 | "\\{navi2ch-history-mode-map}" 158 | (interactive) 159 | (kill-all-local-variables) 160 | (setq major-mode 'navi2ch-history-mode) 161 | (setq mode-name "Navi2ch History") 162 | (setq buffer-read-only t) 163 | (buffer-disable-undo) 164 | (use-local-map navi2ch-history-mode-map) 165 | (navi2ch-history-setup-menu) 166 | (run-hooks 'navi2ch-bm-mode-hook 'navi2ch-history-mode-hook)) 167 | 168 | (defun navi2ch-history-save-info () 169 | (let ((info (mapcar 170 | (lambda (x) 171 | (let ((board (nth 1 x)) 172 | (article (nth 2 x))) 173 | (list (list 174 | (assq 'name board) 175 | (assq 'uri board) 176 | (assq 'id board)) 177 | (list 178 | (assq 'subject article) 179 | (assq 'artid article))))) 180 | navi2ch-history-alist))) 181 | (navi2ch-save-info navi2ch-history-file info t))) 182 | 183 | (defun navi2ch-history-load-info () 184 | (setq navi2ch-history-alist 185 | (mapcar 186 | (lambda (x) 187 | (cons (navi2ch-history-get-key (car x) (cadr x)) x)) 188 | (navi2ch-load-info navi2ch-history-file)))) 189 | 190 | (defun navi2ch-history-delete () 191 | "$B$=$N9T$r(B history $B$+$i:o=|$9$k!#(B" 192 | (interactive) 193 | (save-excursion 194 | (beginning-of-line) 195 | (let ((item (navi2ch-history-get-property (point)))) 196 | (if item 197 | (let ((pair (assoc item navi2ch-history-alist)) 198 | (buffer-read-only nil)) 199 | (setq navi2ch-history-alist (delq pair navi2ch-history-alist)) 200 | (delete-region (point) (save-excursion (forward-line) (point))) 201 | (navi2ch-bm-renumber)) 202 | (message "Can't select this line!"))))) 203 | 204 | (defun navi2ch-history-delete-mark-article () 205 | (interactive) 206 | (navi2ch-bm-exec-subr 'navi2ch-history-delete)) 207 | 208 | (defun navi2ch-history-cut () 209 | (interactive) 210 | (save-excursion 211 | (beginning-of-line) 212 | (let ((item (navi2ch-history-get-property (point)))) 213 | (if item 214 | (progn 215 | (push (assoc item navi2ch-history-alist) navi2ch-history-cut-stack) 216 | (navi2ch-history-delete)) 217 | (message "Can't select this line!"))))) 218 | 219 | (defun navi2ch-history-cut-mark-article () 220 | (interactive) 221 | (navi2ch-bm-exec-subr 'navi2ch-history-cut)) 222 | 223 | (defun navi2ch-history-yank () 224 | (interactive) 225 | (let ((pair (pop navi2ch-history-cut-stack))) 226 | (if pair 227 | (progn 228 | (if (eobp) 229 | (if navi2ch-history-alist 230 | (setcdr (last navi2ch-history-alist) 231 | (list pair)) 232 | (setq navi2ch-history-alist (list pair))) 233 | (let ((list (member (assoc (navi2ch-history-get-property (point)) 234 | navi2ch-history-alist) 235 | navi2ch-history-alist))) 236 | (setcdr list (copy-sequence list)) 237 | (setcar list pair))) 238 | (let ((buffer-read-only nil)) 239 | (navi2ch-history-insert-subject 0 (car pair))) 240 | (navi2ch-bm-renumber)) 241 | (message "Stack is empty")))) 242 | 243 | (defun navi2ch-history-change (changed-list) 244 | "$BJQ99$5$l$?HD$NMzNr$r=$@5$9$k!#(B 245 | CHANGED-LIST $B$K$D$$$F$O(B `navi2ch-list-get-changed-status' $B$r;2>H!#(B" 246 | (setq navi2ch-history-alist 247 | (mapcar 248 | (lambda (node) 249 | (let* ((board (cadr node)) 250 | (article (caddr node)) 251 | (changed (assoc (cdr (assq 'id board)) changed-list))) 252 | (if changed 253 | (let ((new-board (caddr changed))) 254 | (list (navi2ch-history-get-key new-board article) 255 | new-board 256 | article)) 257 | node))) 258 | navi2ch-history-alist)) 259 | (navi2ch-history-save-info)) 260 | 261 | (run-hooks 'navi2ch-history-load-hook) 262 | ;;; navi2ch-history.el ends here 263 | -------------------------------------------------------------------------------- /navi2ch-auto-modify.el: -------------------------------------------------------------------------------- 1 | ;;; navi2ch-auto-modify.el --- auto file modification module for navi2ch -*- coding: iso-2022-7bit; -*- 2 | 3 | ;; Copyright (C) 2003, 2005, 2006 by Navi2ch Project 4 | 5 | ;; Author: extra 6 | ;; Keywords: network, 2ch 7 | 8 | ;; This file is free software; you can redistribute it and/or modify 9 | ;; it under the terms of the GNU General Public License as published by 10 | ;; the Free Software Foundation; either version 2, or (at your option) 11 | ;; any later version. 12 | 13 | ;; This file is distributed in the hope that it will be useful, 14 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | ;; GNU General Public License for more details. 17 | 18 | ;; You should have received a copy of the GNU General Public License 19 | ;; along with GNU Emacs; see the file COPYING. If not, write to 20 | ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 21 | ;; Boston, MA 02111-1307, USA. 22 | 23 | ;;; Commentary: 24 | 25 | ;; 26 | 27 | ;;; Code: 28 | (provide 'navi2ch-auto-modify) 29 | (defconst navi2ch-auto-modify-ident 30 | "$Id$") 31 | 32 | (eval-when-compile (require 'cl)) 33 | 34 | (require 'navi2ch-vars) 35 | (require 'navi2ch-util) 36 | 37 | (defvar navi2ch-auto-modify-variable-list nil 38 | "$B@_Dj$r<+F0E*$KJQ99$7$FJ]B8$9$kJQ?tL>$N%j%9%H!#(B") 39 | 40 | (add-hook 'navi2ch-exit-hook 'navi2ch-auto-modify-save) 41 | 42 | (defun navi2ch-auto-modify-subr (body) 43 | (prog2 (setq navi2ch-auto-modify-variable-list nil) 44 | (eval (cons 'progn body)) 45 | (let (added) 46 | (dolist (sexp body) 47 | (when (memq (car-safe sexp) '(setq setq-default)) 48 | (setq sexp (cdr sexp)) 49 | (while sexp 50 | (unless (or (memq (car sexp) navi2ch-auto-modify-variable-list) 51 | (memq (car sexp) added)) 52 | (setq added (cons (car sexp) added))) 53 | (setq sexp (cddr sexp))))) 54 | (when added 55 | (setq navi2ch-auto-modify-variable-list 56 | (append navi2ch-auto-modify-variable-list 57 | (nreverse added))))))) 58 | 59 | (defmacro navi2ch-auto-modify (&rest body) 60 | "`navi2ch-auto-modify-file' $B$G;XDj$5$l$?%U%!%$%k$K5-=R$9$k$H!"(B 61 | $B$=$NCf$K4^$^$l$kJQ?t$N@_Dj$r<+F0E*$KJQ99$7$FJ]B8$9$k!#(B 62 | 63 | $BNc$($P2<5-$N$h$&$K5-=R$9$k$H!"(B 64 | $BJQ?t(B `navi2ch-article-message-filter-by-id-alist' $B$H(B 65 | `navi2ch-article-message-filter-by-message-alist' $B$N@_DjCM$O!"(B 66 | Navi2ch $B=*N;;~$K<+F0E*$KJQ99!&J]B8$5$l$k!#(B 67 | 68 | \(navi2ch-auto-modify 69 | (setq navi2ch-article-message-filter-by-id-alist 70 | ...) 71 | (setq navi2ch-article-message-filter-by-message-alist 72 | ...))" 73 | `(navi2ch-auto-modify-subr ',body)) 74 | 75 | (put 'navi2ch-auto-modify 'lisp-indent-function 0) 76 | 77 | (defun navi2ch-auto-modify-variables (variables) 78 | (let (added) 79 | (dolist (var variables) 80 | (unless (or (memq var navi2ch-auto-modify-variable-list) 81 | (memq var added)) 82 | (setq added (cons var added)))) 83 | (when added 84 | (setq navi2ch-auto-modify-variable-list 85 | (append navi2ch-auto-modify-variable-list (nreverse added))))) 86 | (navi2ch-auto-modify-save)) 87 | 88 | (eval-when-compile 89 | (defmacro default-major-mode () 90 | (if (and (<= 23 emacs-major-version) 91 | (<= 1 emacs-minor-version)) 92 | ''major-mode 93 | ''default-major-mode))) 94 | 95 | (defun navi2ch-auto-modify-save () 96 | (run-hooks 'navi2ch-auto-modify-save-hook) 97 | (navi2ch-auto-modify-truncate-lists) 98 | (when navi2ch-auto-modify-variable-list 99 | (let ((navi2ch-auto-modify-file 100 | (if (eq navi2ch-auto-modify-file t) 101 | (locate-library (expand-file-name navi2ch-init-file 102 | navi2ch-directory)) 103 | navi2ch-auto-modify-file))) 104 | (when navi2ch-auto-modify-file 105 | (let ((inhibit-read-only t) 106 | (require-final-newline (eq require-final-newline t)) 107 | (value-buffer (current-buffer)) 108 | (exist-buffer (get-file-buffer navi2ch-auto-modify-file))) 109 | (save-current-buffer 110 | (let ((default-major-mode 'fundamental-mode)) 111 | (set-buffer (find-file-noselect navi2ch-auto-modify-file))) 112 | (save-excursion 113 | (save-restriction 114 | (widen) 115 | (navi2ch-auto-modify-narrow) 116 | (navi2ch-auto-modify-save-variables value-buffer))) 117 | (unless exist-buffer 118 | (basic-save-buffer) 119 | (kill-buffer (current-buffer)))))) 120 | (navi2ch-auto-modify-customize-variables)))) 121 | 122 | (defun navi2ch-auto-modify-skip-comments () 123 | (while (and (not (eobp)) 124 | (forward-comment 1)))) 125 | 126 | (defun navi2ch-auto-modify-narrow () 127 | (goto-char (point-min)) 128 | (navi2ch-auto-modify-skip-comments) 129 | ;; Test for scan errors. 130 | (save-excursion 131 | (while (not (eobp)) 132 | (forward-sexp))) 133 | (catch 'loop 134 | (let ((standard-input (current-buffer))) 135 | (while (not (eobp)) 136 | (condition-case nil 137 | (let ((beg (point)) 138 | (sexp (read))) 139 | (when (consp sexp) 140 | (if (eq (car sexp) 'navi2ch-auto-modify) 141 | (progn 142 | (narrow-to-region beg (point)) 143 | (throw 'loop nil)) 144 | (when (re-search-backward "\\" 145 | (1+ beg) t) 146 | (goto-char (1+ beg)))))) 147 | (invalid-read-syntax nil)) 148 | (navi2ch-auto-modify-skip-comments))) 149 | (unless (bobp) 150 | (skip-chars-backward "\n" (1- (point))) 151 | (let ((count (save-excursion (skip-chars-backward "\n")))) 152 | (when (> count -2) 153 | (insert-char ?\n (+ count 2)))) 154 | (narrow-to-region (point) (point))) 155 | (insert "(navi2ch-auto-modify)"))) 156 | 157 | (defun navi2ch-auto-modify-save-variables (&optional buffer) 158 | (goto-char (1+ (point-min))) ; "\\`(" 159 | (forward-sexp) ; "navi2ch-auto-modify" 160 | (navi2ch-auto-modify-skip-comments) 161 | (let ((standard-input (current-buffer)) 162 | (standard-output (current-buffer)) 163 | (print-length nil) 164 | (print-level nil) 165 | modified) 166 | (condition-case nil 167 | (while (not (eobp)) 168 | (let ((beg (point)) 169 | (sexp (read))) 170 | (when (memq (car-safe sexp) '(setq setq-default)) 171 | (save-excursion 172 | (goto-char (1+ beg)) ; "(" 173 | (forward-sexp) ; "setq\\(-default\\)?" 174 | (navi2ch-auto-modify-skip-comments) 175 | (condition-case nil 176 | (while (not (eobp)) 177 | (let ((var (read)) 178 | start end) 179 | (navi2ch-auto-modify-skip-comments) 180 | (setq start (point)) 181 | (forward-sexp) 182 | (delete-region start (point)) 183 | (pp (navi2ch-quote-maybe 184 | (if (and buffer 185 | (local-variable-p var buffer)) 186 | (with-current-buffer buffer 187 | (symbol-value var)) 188 | (symbol-value var)))) 189 | (setq end (point-marker)) 190 | (goto-char start) 191 | (indent-sexp) 192 | (forward-sexp) 193 | (delete-region (point) end) 194 | (unless (memq var modified) 195 | (setq modified (cons var modified)))) 196 | (navi2ch-auto-modify-skip-comments)) 197 | (invalid-read-syntax nil))))) ; ")" 198 | (navi2ch-auto-modify-skip-comments)) 199 | (invalid-read-syntax nil)) ; ")\\'" 200 | (backward-char) 201 | (dolist (var navi2ch-auto-modify-variable-list) 202 | (unless (memq var modified) 203 | (unless (navi2ch-auto-modify-customize-variable-p var) 204 | (insert ?\n) 205 | (lisp-indent-line) 206 | (let ((start (point)) 207 | end) 208 | (pp (list (if (local-variable-if-set-p var (current-buffer)) 209 | 'setq-default 210 | 'setq) 211 | var 212 | (navi2ch-quote-maybe 213 | (if (and buffer 214 | (local-variable-p var buffer)) 215 | (with-current-buffer buffer 216 | (symbol-value var)) 217 | (symbol-value var))))) 218 | (setq end (point-marker)) 219 | (goto-char start) 220 | (indent-sexp) 221 | (forward-sexp) 222 | (delete-region (point) end))) 223 | (setq modified (cons var modified)))) 224 | (setq navi2ch-auto-modify-variable-list (nreverse modified)))) 225 | 226 | (defun navi2ch-auto-modify-customize-variable-p (variable) 227 | (or (null navi2ch-auto-modify-file) 228 | (get variable 'saved-value) ; From `customize-saved' 229 | (get variable 'saved-variable-comment))) ; For XEmacs 230 | 231 | (defun navi2ch-auto-modify-customize-variables () 232 | (let (customized) 233 | (dolist (var navi2ch-auto-modify-variable-list) 234 | (when (navi2ch-auto-modify-customize-variable-p var) 235 | (customize-set-variable var (symbol-value var)) 236 | (setq customized t))) 237 | (when customized 238 | (customize-save-customized)))) 239 | 240 | (defun navi2ch-auto-modify-truncate-lists () 241 | (when navi2ch-auto-modify-truncate-list-alist 242 | (let (added) 243 | (dolist (slot navi2ch-auto-modify-truncate-list-alist) 244 | (when (> (length (symbol-value (car slot))) (cdr slot)) 245 | (if (zerop (cdr slot)) 246 | (set (car slot) nil) 247 | (setcdr (nthcdr (1- (cdr slot)) (symbol-value (car slot))) nil)) 248 | (unless (or (memq (car slot) navi2ch-auto-modify-variable-list) 249 | (memq (car slot) added)) 250 | (setq added (cons (car slot) added))))) 251 | (when added 252 | (setq navi2ch-auto-modify-variable-list 253 | (append navi2ch-auto-modify-variable-list (nreverse added))))))) 254 | 255 | ;;; navi2ch-auto-modify.el ends here 256 | -------------------------------------------------------------------------------- /navi2ch-machibbs.el: -------------------------------------------------------------------------------- 1 | ;;; navi2ch-machibbs.el --- View machiBBS module for Navi2ch. -*- coding: iso-2022-7bit; -*- 2 | 3 | ;; Copyright (C) 2002, 2003, 2004, 2009 by Navi2ch Project 4 | 5 | ;; Author: 6 | ;; Part5 $B%9%l$N(B 509 $B$NL>L5$7$5$s(B 7 | ;; 8 | 9 | ;; Keywords: 2ch, network 10 | 11 | ;; This file is free software; you can redistribute it and/or modify 12 | ;; it under the terms of the GNU General Public License as published by 13 | ;; the Free Software Foundation; either version 2, or (at your option) 14 | ;; any later version. 15 | 16 | ;; This file is distributed in the hope that it will be useful, 17 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | ;; GNU General Public License for more details. 20 | 21 | ;; You should have received a copy of the GNU General Public License 22 | ;; along with GNU Emacs; see the file COPYING. If not, write to 23 | ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 24 | ;; Boston, MA 02111-1307, USA. 25 | 26 | ;;; Commentary: 27 | 28 | ;; 29 | 30 | ;;; Code: 31 | (provide 'navi2ch-machibbs) 32 | (defconst navi2ch-machibbs-ident 33 | "$Id$") 34 | 35 | (eval-when-compile (require 'cl)) 36 | (require 'navi2ch-multibbs) 37 | 38 | (defvar navi2ch-machibbs-func-alist 39 | '((bbs-p . navi2ch-machibbs-p) 40 | (subject-callback . navi2ch-machibbs-subject-callback) 41 | (article-update . navi2ch-machibbs-article-update) 42 | (article-to-url . navi2ch-machibbs-article-to-url) 43 | (url-to-board . navi2ch-machibbs-url-to-board) 44 | (url-to-article . navi2ch-machibbs-url-to-article) 45 | (send-message . navi2ch-machibbs-send-message) 46 | (send-success-p . navi2ch-machibbs-send-message-success-p) 47 | (board-update . navi2ch-machibbs-board-update))) 48 | 49 | (defvar navi2ch-machibbs-variable-alist 50 | (list (cons 'coding-system navi2ch-coding-system))) 51 | 52 | (navi2ch-multibbs-regist 'machibbs 53 | navi2ch-machibbs-func-alist 54 | navi2ch-machibbs-variable-alist) 55 | 56 | ;; (defvar navi2ch-machibbs-subject-max-bytes 5000 57 | ;; "$B%9%l$N0lMw$r$I$l$@$1I=<($9$k$+!#(B 58 | ;; 0$B$N>l9g$OA4$FI=<($9$k!#(B") 59 | 60 | ;;------------- 61 | 62 | (defun navi2ch-machibbs-p (uri) 63 | "URI $B$,(B machibbs $B$J$i(B non-nil$B$rJV$9!#(B" 64 | (or (string-match "http://[^\\.]+\\.machibbs\\.com/" uri) 65 | (string-match "http://[^\\.]+\\.machi\\.to/" uri))) 66 | 67 | ;; (defun navi2ch-machibbs-subject-callback (string) 68 | ;; "subject.txt $B$r navi2ch-machibbs-subject-max-bytes 0) 71 | ;; (substring string 0 navi2ch-machibbs-subject-max-bytes) 72 | ;; string))) 73 | ;; (navi2ch-replace-string 74 | ;; "\\([0-9]+\\.\\)cgi\\([^\n]+\n\\)" "\\1dat\\2" sub-string t))) 75 | 76 | (navi2ch-multibbs-defcallback navi2ch-machibbs-subject-callback (machibbs) 77 | "subject.txt $B$r\\([0-9]+\\)<>\\([^\n]+\n\\)" nil t) 80 | (replace-match "\\1.dat<>\\2"))) 81 | 82 | (defun navi2ch-machibbs-article-update (board article start) 83 | "BOARD ARTICLE $B$N5-;v$r99?7$9$k!#(B 84 | START $B$,(B non-nil $B$J$i$P%l%9HV9f(B START $B$+$i$N:9J,$r\\([0-9]+\\) ?$BL>A0!'(B\\(
?\\|]*>\ 181 | ?\\)\\(.*\\) ?.+ ?$BEj9FF|!'(B ?\\(.*\\)\\(\n\\( ?]\\)\\)?
\ 182 |
?\\(.*\\) ?

$") 183 | (defvar navi2ch-machibbs-parse-subject-regexp "\\(.*\\)") 184 | 185 | (defun navi2ch-machibbs-parse-subject () 186 | (let ((case-fold-search t)) 187 | (and (re-search-forward navi2ch-machibbs-parse-subject-regexp nil t) 188 | (match-string 1)))) 189 | 190 | (defun navi2ch-machibbs-parse () 191 | (let ((case-fold-search t)) 192 | (re-search-forward navi2ch-machibbs-parse-regexp nil t))) 193 | 194 | (defun navi2ch-machibbs-make-article (&optional subject) 195 | (let ((mail (match-string 3)) 196 | (name (match-string 4)) 197 | (date (match-string 5)) 198 | (date-tail (match-string 7)) 199 | (contents (match-string 8))) 200 | (format "%s<>%s<>%s<>%s<>%s\n" 201 | name (or mail "") (concat date (or date-tail "")) 202 | contents (or subject "")))) 203 | 204 | (navi2ch-multibbs-defcallback navi2ch-machibbs-article-callback 205 | (machibbs &optional diff) 206 | (let ((beg (point)) 207 | (max-num 0) 208 | subject alist num min-num) 209 | (unless diff 210 | (setq subject (navi2ch-machibbs-parse-subject))) 211 | (while (navi2ch-machibbs-parse) 212 | (setq num (string-to-number (match-string 1)) 213 | min-num (or min-num num) 214 | max-num (max max-num num) 215 | alist (cons (cons (string-to-number (match-string 1)) 216 | (navi2ch-machibbs-make-article subject)) 217 | alist) 218 | subject nil)) 219 | (delete-region beg (point-max)) 220 | (when (and min-num max-num) 221 | (let ((i min-num)) 222 | (while (<= i max-num) 223 | (insert (or (cdr (assoc i alist)) 224 | "$B$"$\!<$s(B<>$B$"$\!<$s(B<>$B$"$\!<$s(B<>$B$"$\!<$s(B<>\n")) 225 | (setq i (1+ i))))))) 226 | 227 | (defun navi2ch-machibbs-article-callback-diff () 228 | (navi2ch-machibbs-article-callback t)) 229 | 230 | (defun navi2ch-machibbs-board-update (board) 231 | (let ((uri (navi2ch-board-get-uri board))) 232 | (when (string-match "\\(.+\\)/\\([^/]+\\)/$" uri) 233 | (let ((url (format "%s/bbs/offlaw.cgi/%s/" 234 | (match-string 1 uri) 235 | (cdr (assq 'id board)))) 236 | (file (navi2ch-board-get-file-name board)) 237 | (time (cdr (assq 'time board))) 238 | (func (navi2ch-multibbs-subject-callback board))) 239 | (navi2ch-net-update-file url file time func))))) 240 | 241 | ;;; navi2ch-machibbs.el ends here 242 | -------------------------------------------------------------------------------- /icons/Makefile.in: -------------------------------------------------------------------------------- 1 | # Makefile.in generated by automake 1.9.6 from Makefile.am. 2 | # @configure_input@ 3 | 4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 5 | # 2003, 2004, 2005 Free Software Foundation, Inc. 6 | # This Makefile.in is free software; the Free Software Foundation 7 | # gives unlimited permission to copy and/or distribute it, 8 | # with or without modifications, as long as this notice is preserved. 9 | 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without 12 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 13 | # PARTICULAR PURPOSE. 14 | 15 | @SET_MAKE@ 16 | 17 | srcdir = @srcdir@ 18 | top_srcdir = @top_srcdir@ 19 | VPATH = @srcdir@ 20 | pkgdatadir = $(datadir)/@PACKAGE@ 21 | pkglibdir = $(libdir)/@PACKAGE@ 22 | pkgincludedir = $(includedir)/@PACKAGE@ 23 | top_builddir = .. 24 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 25 | INSTALL = @INSTALL@ 26 | install_sh_DATA = $(install_sh) -c -m 644 27 | install_sh_PROGRAM = $(install_sh) -c 28 | install_sh_SCRIPT = $(install_sh) -c 29 | INSTALL_HEADER = $(INSTALL_DATA) 30 | transform = $(program_transform_name) 31 | NORMAL_INSTALL = : 32 | PRE_INSTALL = : 33 | POST_INSTALL = : 34 | NORMAL_UNINSTALL = : 35 | PRE_UNINSTALL = : 36 | POST_UNINSTALL = : 37 | subdir = icons 38 | DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING 39 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 40 | am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ 41 | $(top_srcdir)/configure.in 42 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 43 | $(ACLOCAL_M4) 44 | mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs 45 | CONFIG_CLEAN_FILES = 46 | SOURCES = 47 | DIST_SOURCES = 48 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; 49 | am__vpath_adj = case $$p in \ 50 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ 51 | *) f=$$p;; \ 52 | esac; 53 | am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; 54 | am__installdirs = "$(DESTDIR)$(icondir)" 55 | iconDATA_INSTALL = $(INSTALL_DATA) 56 | DATA = $(icon_DATA) 57 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 58 | ACLOCAL = @ACLOCAL@ 59 | AMTAR = @AMTAR@ 60 | AUTOCONF = @AUTOCONF@ 61 | AUTOHEADER = @AUTOHEADER@ 62 | AUTOMAKE = @AUTOMAKE@ 63 | AWK = @AWK@ 64 | CYGPATH_W = @CYGPATH_W@ 65 | DEFS = @DEFS@ 66 | ECHO_C = @ECHO_C@ 67 | ECHO_N = @ECHO_N@ 68 | ECHO_T = @ECHO_T@ 69 | EMACS = @EMACS@ 70 | EMACSLOADPATH = @EMACSLOADPATH@ 71 | INSTALL_DATA = @INSTALL_DATA@ 72 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ 73 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ 74 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ 75 | LIBOBJS = @LIBOBJS@ 76 | LIBS = @LIBS@ 77 | LTLIBOBJS = @LTLIBOBJS@ 78 | MAINT = @MAINT@ 79 | MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ 80 | MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ 81 | MAKEINFO = @MAKEINFO@ 82 | PACKAGE = @PACKAGE@ 83 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ 84 | PACKAGE_NAME = @PACKAGE_NAME@ 85 | PACKAGE_STRING = @PACKAGE_STRING@ 86 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ 87 | PACKAGE_URL = @PACKAGE_URL@ 88 | PACKAGE_VERSION = @PACKAGE_VERSION@ 89 | PATH_SEPARATOR = @PATH_SEPARATOR@ 90 | SET_MAKE = @SET_MAKE@ 91 | SHELL = @SHELL@ 92 | STRIP = @STRIP@ 93 | VERSION = @VERSION@ 94 | am__leading_dot = @am__leading_dot@ 95 | am__tar = @am__tar@ 96 | am__untar = @am__untar@ 97 | bindir = @bindir@ 98 | build_alias = @build_alias@ 99 | datadir = @datadir@ 100 | datarootdir = @datarootdir@ 101 | docdir = @docdir@ 102 | dvidir = @dvidir@ 103 | exec_prefix = @exec_prefix@ 104 | host_alias = @host_alias@ 105 | htmldir = @htmldir@ 106 | icondir = @icondir@ 107 | includedir = @includedir@ 108 | infodir = @infodir@ 109 | install_sh = @install_sh@ 110 | libdir = @libdir@ 111 | libexecdir = @libexecdir@ 112 | lispdir = @lispdir@ 113 | localedir = @localedir@ 114 | localstatedir = @localstatedir@ 115 | mandir = @mandir@ 116 | mkdir_p = @mkdir_p@ 117 | oldincludedir = @oldincludedir@ 118 | packagedir = @packagedir@ 119 | pdfdir = @pdfdir@ 120 | prefix = @prefix@ 121 | program_transform_name = @program_transform_name@ 122 | psdir = @psdir@ 123 | sbindir = @sbindir@ 124 | sharedstatedir = @sharedstatedir@ 125 | sysconfdir = @sysconfdir@ 126 | target_alias = @target_alias@ 127 | icon_DATA = plugged.xpm unplugged.xpm 128 | EXTRA_DIST = $(icon_DATA) 129 | all: all-am 130 | 131 | .SUFFIXES: 132 | $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) 133 | @for dep in $?; do \ 134 | case '$(am__configure_deps)' in \ 135 | *$$dep*) \ 136 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ 137 | && exit 0; \ 138 | exit 1;; \ 139 | esac; \ 140 | done; \ 141 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu icons/Makefile'; \ 142 | cd $(top_srcdir) && \ 143 | $(AUTOMAKE) --gnu icons/Makefile 144 | .PRECIOUS: Makefile 145 | 146 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) 147 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 148 | 149 | $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 150 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 151 | $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) 152 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 153 | uninstall-info-am: 154 | install-iconDATA: $(icon_DATA) 155 | @$(NORMAL_INSTALL) 156 | test -z "$(icondir)" || $(mkdir_p) "$(DESTDIR)$(icondir)" 157 | @list='$(icon_DATA)'; for p in $$list; do \ 158 | if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ 159 | f=$(am__strip_dir) \ 160 | echo " $(iconDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(icondir)/$$f'"; \ 161 | $(iconDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(icondir)/$$f"; \ 162 | done 163 | 164 | uninstall-iconDATA: 165 | @$(NORMAL_UNINSTALL) 166 | @list='$(icon_DATA)'; for p in $$list; do \ 167 | f=$(am__strip_dir) \ 168 | echo " rm -f '$(DESTDIR)$(icondir)/$$f'"; \ 169 | rm -f "$(DESTDIR)$(icondir)/$$f"; \ 170 | done 171 | tags: TAGS 172 | TAGS: 173 | 174 | ctags: CTAGS 175 | CTAGS: 176 | 177 | 178 | distdir: $(DISTFILES) 179 | @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ 180 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ 181 | list='$(DISTFILES)'; for file in $$list; do \ 182 | case $$file in \ 183 | $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ 184 | $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ 185 | esac; \ 186 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ 187 | dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ 188 | if test "$$dir" != "$$file" && test "$$dir" != "."; then \ 189 | dir="/$$dir"; \ 190 | $(mkdir_p) "$(distdir)$$dir"; \ 191 | else \ 192 | dir=''; \ 193 | fi; \ 194 | if test -d $$d/$$file; then \ 195 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ 196 | cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ 197 | fi; \ 198 | cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ 199 | else \ 200 | test -f $(distdir)/$$file \ 201 | || cp -p $$d/$$file $(distdir)/$$file \ 202 | || exit 1; \ 203 | fi; \ 204 | done 205 | check-am: all-am 206 | check: check-am 207 | all-am: Makefile $(DATA) 208 | installdirs: 209 | for dir in "$(DESTDIR)$(icondir)"; do \ 210 | test -z "$$dir" || $(mkdir_p) "$$dir"; \ 211 | done 212 | install: install-am 213 | install-exec: install-exec-am 214 | install-data: install-data-am 215 | uninstall: uninstall-am 216 | 217 | install-am: all-am 218 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am 219 | 220 | installcheck: installcheck-am 221 | install-strip: 222 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 223 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 224 | `test -z '$(STRIP)' || \ 225 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install 226 | mostlyclean-generic: 227 | 228 | clean-generic: 229 | 230 | distclean-generic: 231 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) 232 | 233 | maintainer-clean-generic: 234 | @echo "This command is intended for maintainers to use" 235 | @echo "it deletes files that may require special tools to rebuild." 236 | clean: clean-am 237 | 238 | clean-am: clean-generic mostlyclean-am 239 | 240 | distclean: distclean-am 241 | -rm -f Makefile 242 | distclean-am: clean-am distclean-generic 243 | 244 | dvi: dvi-am 245 | 246 | dvi-am: 247 | 248 | html: html-am 249 | 250 | info: info-am 251 | 252 | info-am: 253 | 254 | install-data-am: install-iconDATA 255 | 256 | install-exec-am: 257 | 258 | install-info: install-info-am 259 | 260 | install-man: 261 | 262 | installcheck-am: 263 | 264 | maintainer-clean: maintainer-clean-am 265 | -rm -f Makefile 266 | maintainer-clean-am: distclean-am maintainer-clean-generic 267 | 268 | mostlyclean: mostlyclean-am 269 | 270 | mostlyclean-am: mostlyclean-generic 271 | 272 | pdf: pdf-am 273 | 274 | pdf-am: 275 | 276 | ps: ps-am 277 | 278 | ps-am: 279 | 280 | uninstall-am: uninstall-iconDATA uninstall-info-am 281 | 282 | .PHONY: all all-am check check-am clean clean-generic distclean \ 283 | distclean-generic distdir dvi dvi-am html html-am info info-am \ 284 | install install-am install-data install-data-am install-exec \ 285 | install-exec-am install-iconDATA install-info install-info-am \ 286 | install-man install-strip installcheck installcheck-am \ 287 | installdirs maintainer-clean maintainer-clean-generic \ 288 | mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ 289 | uninstall-am uninstall-iconDATA uninstall-info-am 290 | 291 | 292 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 293 | cd $(top_builddir) && \ 294 | CONFIG_HEADERS= CONFIG_LINKS= \ 295 | CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status 296 | # Tell versions [3.59,3.63) of GNU make to not export all variables. 297 | # Otherwise a system limit (for SysV at least) may be exceeded. 298 | .NOEXPORT: 299 | -------------------------------------------------------------------------------- /INSTALL: -------------------------------------------------------------------------------- 1 | Installation Instructions 2 | ************************* 3 | 4 | Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free 5 | Software Foundation, Inc. 6 | 7 | This file is free documentation; the Free Software Foundation gives 8 | unlimited permission to copy, distribute and modify it. 9 | 10 | Basic Installation 11 | ================== 12 | 13 | These are generic installation instructions. 14 | 15 | The `configure' shell script attempts to guess correct values for 16 | various system-dependent variables used during compilation. It uses 17 | those values to create a `Makefile' in each directory of the package. 18 | It may also create one or more `.h' files containing system-dependent 19 | definitions. Finally, it creates a shell script `config.status' that 20 | you can run in the future to recreate the current configuration, and a 21 | file `config.log' containing compiler output (useful mainly for 22 | debugging `configure'). 23 | 24 | It can also use an optional file (typically called `config.cache' 25 | and enabled with `--cache-file=config.cache' or simply `-C') that saves 26 | the results of its tests to speed up reconfiguring. (Caching is 27 | disabled by default to prevent problems with accidental use of stale 28 | cache files.) 29 | 30 | If you need to do unusual things to compile the package, please try 31 | to figure out how `configure' could check whether to do them, and mail 32 | diffs or instructions to the address given in the `README' so they can 33 | be considered for the next release. If you are using the cache, and at 34 | some point `config.cache' contains results you don't want to keep, you 35 | may remove or edit it. 36 | 37 | The file `configure.ac' (or `configure.in') is used to create 38 | `configure' by a program called `autoconf'. You only need 39 | `configure.ac' if you want to change it or regenerate `configure' using 40 | a newer version of `autoconf'. 41 | 42 | The simplest way to compile this package is: 43 | 44 | 1. `cd' to the directory containing the package's source code and type 45 | `./configure' to configure the package for your system. If you're 46 | using `csh' on an old version of System V, you might need to type 47 | `sh ./configure' instead to prevent `csh' from trying to execute 48 | `configure' itself. 49 | 50 | Running `configure' takes awhile. While running, it prints some 51 | messages telling which features it is checking for. 52 | 53 | 2. Type `make' to compile the package. 54 | 55 | 3. Optionally, type `make check' to run any self-tests that come with 56 | the package. 57 | 58 | 4. Type `make install' to install the programs and any data files and 59 | documentation. 60 | 61 | 5. You can remove the program binaries and object files from the 62 | source code directory by typing `make clean'. To also remove the 63 | files that `configure' created (so you can compile the package for 64 | a different kind of computer), type `make distclean'. There is 65 | also a `make maintainer-clean' target, but that is intended mainly 66 | for the package's developers. If you use it, you may have to get 67 | all sorts of other programs in order to regenerate files that came 68 | with the distribution. 69 | 70 | Compilers and Options 71 | ===================== 72 | 73 | Some systems require unusual options for compilation or linking that the 74 | `configure' script does not know about. Run `./configure --help' for 75 | details on some of the pertinent environment variables. 76 | 77 | You can give `configure' initial values for configuration parameters 78 | by setting variables in the command line or in the environment. Here 79 | is an example: 80 | 81 | ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix 82 | 83 | *Note Defining Variables::, for more details. 84 | 85 | Compiling For Multiple Architectures 86 | ==================================== 87 | 88 | You can compile the package for more than one kind of computer at the 89 | same time, by placing the object files for each architecture in their 90 | own directory. To do this, you must use a version of `make' that 91 | supports the `VPATH' variable, such as GNU `make'. `cd' to the 92 | directory where you want the object files and executables to go and run 93 | the `configure' script. `configure' automatically checks for the 94 | source code in the directory that `configure' is in and in `..'. 95 | 96 | If you have to use a `make' that does not support the `VPATH' 97 | variable, you have to compile the package for one architecture at a 98 | time in the source code directory. After you have installed the 99 | package for one architecture, use `make distclean' before reconfiguring 100 | for another architecture. 101 | 102 | Installation Names 103 | ================== 104 | 105 | By default, `make install' installs the package's commands under 106 | `/usr/local/bin', include files under `/usr/local/include', etc. You 107 | can specify an installation prefix other than `/usr/local' by giving 108 | `configure' the option `--prefix=PREFIX'. 109 | 110 | You can specify separate installation prefixes for 111 | architecture-specific files and architecture-independent files. If you 112 | pass the option `--exec-prefix=PREFIX' to `configure', the package uses 113 | PREFIX as the prefix for installing programs and libraries. 114 | Documentation and other data files still use the regular prefix. 115 | 116 | In addition, if you use an unusual directory layout you can give 117 | options like `--bindir=DIR' to specify different values for particular 118 | kinds of files. Run `configure --help' for a list of the directories 119 | you can set and what kinds of files go in them. 120 | 121 | If the package supports it, you can cause programs to be installed 122 | with an extra prefix or suffix on their names by giving `configure' the 123 | option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 124 | 125 | Optional Features 126 | ================= 127 | 128 | Some packages pay attention to `--enable-FEATURE' options to 129 | `configure', where FEATURE indicates an optional part of the package. 130 | They may also pay attention to `--with-PACKAGE' options, where PACKAGE 131 | is something like `gnu-as' or `x' (for the X Window System). The 132 | `README' should mention any `--enable-' and `--with-' options that the 133 | package recognizes. 134 | 135 | For packages that use the X Window System, `configure' can usually 136 | find the X include and library files automatically, but if it doesn't, 137 | you can use the `configure' options `--x-includes=DIR' and 138 | `--x-libraries=DIR' to specify their locations. 139 | 140 | Specifying the System Type 141 | ========================== 142 | 143 | There may be some features `configure' cannot figure out automatically, 144 | but needs to determine by the type of machine the package will run on. 145 | Usually, assuming the package is built to be run on the _same_ 146 | architectures, `configure' can figure that out, but if it prints a 147 | message saying it cannot guess the machine type, give it the 148 | `--build=TYPE' option. TYPE can either be a short name for the system 149 | type, such as `sun4', or a canonical name which has the form: 150 | 151 | CPU-COMPANY-SYSTEM 152 | 153 | where SYSTEM can have one of these forms: 154 | 155 | OS KERNEL-OS 156 | 157 | See the file `config.sub' for the possible values of each field. If 158 | `config.sub' isn't included in this package, then this package doesn't 159 | need to know the machine type. 160 | 161 | If you are _building_ compiler tools for cross-compiling, you should 162 | use the option `--target=TYPE' to select the type of system they will 163 | produce code for. 164 | 165 | If you want to _use_ a cross compiler, that generates code for a 166 | platform different from the build platform, you should specify the 167 | "host" platform (i.e., that on which the generated programs will 168 | eventually be run) with `--host=TYPE'. 169 | 170 | Sharing Defaults 171 | ================ 172 | 173 | If you want to set default values for `configure' scripts to share, you 174 | can create a site shell script called `config.site' that gives default 175 | values for variables like `CC', `cache_file', and `prefix'. 176 | `configure' looks for `PREFIX/share/config.site' if it exists, then 177 | `PREFIX/etc/config.site' if it exists. Or, you can set the 178 | `CONFIG_SITE' environment variable to the location of the site script. 179 | A warning: not all `configure' scripts look for a site script. 180 | 181 | Defining Variables 182 | ================== 183 | 184 | Variables not defined in a site shell script can be set in the 185 | environment passed to `configure'. However, some packages may run 186 | configure again during the build, and the customized values of these 187 | variables may be lost. In order to avoid this problem, you should set 188 | them in the `configure' command line, using `VAR=value'. For example: 189 | 190 | ./configure CC=/usr/local2/bin/gcc 191 | 192 | causes the specified `gcc' to be used as the C compiler (unless it is 193 | overridden in the site shell script). Here is a another example: 194 | 195 | /bin/bash ./configure CONFIG_SHELL=/bin/bash 196 | 197 | Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent 198 | configuration-related scripts to be executed by `/bin/bash'. 199 | 200 | `configure' Invocation 201 | ====================== 202 | 203 | `configure' recognizes the following options to control how it operates. 204 | 205 | `--help' 206 | `-h' 207 | Print a summary of the options to `configure', and exit. 208 | 209 | `--version' 210 | `-V' 211 | Print the version of Autoconf used to generate the `configure' 212 | script, and exit. 213 | 214 | `--cache-file=FILE' 215 | Enable the cache: use and save the results of the tests in FILE, 216 | traditionally `config.cache'. FILE defaults to `/dev/null' to 217 | disable caching. 218 | 219 | `--config-cache' 220 | `-C' 221 | Alias for `--cache-file=config.cache'. 222 | 223 | `--quiet' 224 | `--silent' 225 | `-q' 226 | Do not print messages saying which checks are being made. To 227 | suppress all normal output, redirect it to `/dev/null' (any error 228 | messages will still be shown). 229 | 230 | `--srcdir=DIR' 231 | Look for the package's source code in directory DIR. Usually 232 | `configure' can determine that directory automatically. 233 | 234 | `configure' also accepts some other, not widely useful, options. Run 235 | `configure --help' for more details. 236 | 237 | -------------------------------------------------------------------------------- /install-sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # install - install a program, script, or datafile 3 | 4 | scriptversion=2005-05-14.22 5 | 6 | # This originates from X11R5 (mit/util/scripts/install.sh), which was 7 | # later released in X11R6 (xc/config/util/install.sh) with the 8 | # following copyright and license. 9 | # 10 | # Copyright (C) 1994 X Consortium 11 | # 12 | # Permission is hereby granted, free of charge, to any person obtaining a copy 13 | # of this software and associated documentation files (the "Software"), to 14 | # deal in the Software without restriction, including without limitation the 15 | # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 16 | # sell copies of the Software, and to permit persons to whom the Software is 17 | # furnished to do so, subject to the following conditions: 18 | # 19 | # The above copyright notice and this permission notice shall be included in 20 | # all copies or substantial portions of the Software. 21 | # 22 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 23 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 24 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 25 | # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 26 | # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- 27 | # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | # 29 | # Except as contained in this notice, the name of the X Consortium shall not 30 | # be used in advertising or otherwise to promote the sale, use or other deal- 31 | # ings in this Software without prior written authorization from the X Consor- 32 | # tium. 33 | # 34 | # 35 | # FSF changes to this file are in the public domain. 36 | # 37 | # Calling this script install-sh is preferred over install.sh, to prevent 38 | # `make' implicit rules from creating a file called install from it 39 | # when there is no Makefile. 40 | # 41 | # This script is compatible with the BSD install script, but was written 42 | # from scratch. It can only install one file at a time, a restriction 43 | # shared with many OS's install programs. 44 | 45 | # set DOITPROG to echo to test this script 46 | 47 | # Don't use :- since 4.3BSD and earlier shells don't like it. 48 | doit="${DOITPROG-}" 49 | 50 | # put in absolute paths if you don't have them in your path; or use env. vars. 51 | 52 | mvprog="${MVPROG-mv}" 53 | cpprog="${CPPROG-cp}" 54 | chmodprog="${CHMODPROG-chmod}" 55 | chownprog="${CHOWNPROG-chown}" 56 | chgrpprog="${CHGRPPROG-chgrp}" 57 | stripprog="${STRIPPROG-strip}" 58 | rmprog="${RMPROG-rm}" 59 | mkdirprog="${MKDIRPROG-mkdir}" 60 | 61 | chmodcmd="$chmodprog 0755" 62 | chowncmd= 63 | chgrpcmd= 64 | stripcmd= 65 | rmcmd="$rmprog -f" 66 | mvcmd="$mvprog" 67 | src= 68 | dst= 69 | dir_arg= 70 | dstarg= 71 | no_target_directory= 72 | 73 | usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE 74 | or: $0 [OPTION]... SRCFILES... DIRECTORY 75 | or: $0 [OPTION]... -t DIRECTORY SRCFILES... 76 | or: $0 [OPTION]... -d DIRECTORIES... 77 | 78 | In the 1st form, copy SRCFILE to DSTFILE. 79 | In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. 80 | In the 4th, create DIRECTORIES. 81 | 82 | Options: 83 | -c (ignored) 84 | -d create directories instead of installing files. 85 | -g GROUP $chgrpprog installed files to GROUP. 86 | -m MODE $chmodprog installed files to MODE. 87 | -o USER $chownprog installed files to USER. 88 | -s $stripprog installed files. 89 | -t DIRECTORY install into DIRECTORY. 90 | -T report an error if DSTFILE is a directory. 91 | --help display this help and exit. 92 | --version display version info and exit. 93 | 94 | Environment variables override the default commands: 95 | CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG 96 | " 97 | 98 | while test -n "$1"; do 99 | case $1 in 100 | -c) shift 101 | continue;; 102 | 103 | -d) dir_arg=true 104 | shift 105 | continue;; 106 | 107 | -g) chgrpcmd="$chgrpprog $2" 108 | shift 109 | shift 110 | continue;; 111 | 112 | --help) echo "$usage"; exit $?;; 113 | 114 | -m) chmodcmd="$chmodprog $2" 115 | shift 116 | shift 117 | continue;; 118 | 119 | -o) chowncmd="$chownprog $2" 120 | shift 121 | shift 122 | continue;; 123 | 124 | -s) stripcmd=$stripprog 125 | shift 126 | continue;; 127 | 128 | -t) dstarg=$2 129 | shift 130 | shift 131 | continue;; 132 | 133 | -T) no_target_directory=true 134 | shift 135 | continue;; 136 | 137 | --version) echo "$0 $scriptversion"; exit $?;; 138 | 139 | *) # When -d is used, all remaining arguments are directories to create. 140 | # When -t is used, the destination is already specified. 141 | test -n "$dir_arg$dstarg" && break 142 | # Otherwise, the last argument is the destination. Remove it from $@. 143 | for arg 144 | do 145 | if test -n "$dstarg"; then 146 | # $@ is not empty: it contains at least $arg. 147 | set fnord "$@" "$dstarg" 148 | shift # fnord 149 | fi 150 | shift # arg 151 | dstarg=$arg 152 | done 153 | break;; 154 | esac 155 | done 156 | 157 | if test -z "$1"; then 158 | if test -z "$dir_arg"; then 159 | echo "$0: no input file specified." >&2 160 | exit 1 161 | fi 162 | # It's OK to call `install-sh -d' without argument. 163 | # This can happen when creating conditional directories. 164 | exit 0 165 | fi 166 | 167 | for src 168 | do 169 | # Protect names starting with `-'. 170 | case $src in 171 | -*) src=./$src ;; 172 | esac 173 | 174 | if test -n "$dir_arg"; then 175 | dst=$src 176 | src= 177 | 178 | if test -d "$dst"; then 179 | mkdircmd=: 180 | chmodcmd= 181 | else 182 | mkdircmd=$mkdirprog 183 | fi 184 | else 185 | # Waiting for this to be detected by the "$cpprog $src $dsttmp" command 186 | # might cause directories to be created, which would be especially bad 187 | # if $src (and thus $dsttmp) contains '*'. 188 | if test ! -f "$src" && test ! -d "$src"; then 189 | echo "$0: $src does not exist." >&2 190 | exit 1 191 | fi 192 | 193 | if test -z "$dstarg"; then 194 | echo "$0: no destination specified." >&2 195 | exit 1 196 | fi 197 | 198 | dst=$dstarg 199 | # Protect names starting with `-'. 200 | case $dst in 201 | -*) dst=./$dst ;; 202 | esac 203 | 204 | # If destination is a directory, append the input filename; won't work 205 | # if double slashes aren't ignored. 206 | if test -d "$dst"; then 207 | if test -n "$no_target_directory"; then 208 | echo "$0: $dstarg: Is a directory" >&2 209 | exit 1 210 | fi 211 | dst=$dst/`basename "$src"` 212 | fi 213 | fi 214 | 215 | # This sed command emulates the dirname command. 216 | dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` 217 | 218 | # Make sure that the destination directory exists. 219 | 220 | # Skip lots of stat calls in the usual case. 221 | if test ! -d "$dstdir"; then 222 | defaultIFS=' 223 | ' 224 | IFS="${IFS-$defaultIFS}" 225 | 226 | oIFS=$IFS 227 | # Some sh's can't handle IFS=/ for some reason. 228 | IFS='%' 229 | set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` 230 | shift 231 | IFS=$oIFS 232 | 233 | pathcomp= 234 | 235 | while test $# -ne 0 ; do 236 | pathcomp=$pathcomp$1 237 | shift 238 | if test ! -d "$pathcomp"; then 239 | $mkdirprog "$pathcomp" 240 | # mkdir can fail with a `File exist' error in case several 241 | # install-sh are creating the directory concurrently. This 242 | # is OK. 243 | test -d "$pathcomp" || exit 244 | fi 245 | pathcomp=$pathcomp/ 246 | done 247 | fi 248 | 249 | if test -n "$dir_arg"; then 250 | $doit $mkdircmd "$dst" \ 251 | && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ 252 | && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ 253 | && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ 254 | && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } 255 | 256 | else 257 | dstfile=`basename "$dst"` 258 | 259 | # Make a couple of temp file names in the proper directory. 260 | dsttmp=$dstdir/_inst.$$_ 261 | rmtmp=$dstdir/_rm.$$_ 262 | 263 | # Trap to clean up those temp files at exit. 264 | trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 265 | trap '(exit $?); exit' 1 2 13 15 266 | 267 | # Copy the file name to the temp name. 268 | $doit $cpprog "$src" "$dsttmp" && 269 | 270 | # and set any options; do chmod last to preserve setuid bits. 271 | # 272 | # If any of these fail, we abort the whole thing. If we want to 273 | # ignore errors from any of these, just make sure not to ignore 274 | # errors from the above "$doit $cpprog $src $dsttmp" command. 275 | # 276 | { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ 277 | && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ 278 | && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ 279 | && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && 280 | 281 | # Now rename the file to the real destination. 282 | { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ 283 | || { 284 | # The rename failed, perhaps because mv can't rename something else 285 | # to itself, or perhaps because mv is so ancient that it does not 286 | # support -f. 287 | 288 | # Now remove or move aside any old file at destination location. 289 | # We try this two ways since rm can't unlink itself on some 290 | # systems and the destination file might be busy for other 291 | # reasons. In this case, the final cleanup might fail but the new 292 | # file should still install successfully. 293 | { 294 | if test -f "$dstdir/$dstfile"; then 295 | $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ 296 | || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ 297 | || { 298 | echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 299 | (exit 1); exit 1 300 | } 301 | else 302 | : 303 | fi 304 | } && 305 | 306 | # Now rename the file to the real destination. 307 | $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" 308 | } 309 | } 310 | fi || { (exit 1); exit 1; } 311 | done 312 | 313 | # The final little trick to "correctly" pass the exit status to the exit trap. 314 | { 315 | (exit 0); exit 0 316 | } 317 | 318 | # Local variables: 319 | # eval: (add-hook 'write-file-hooks 'time-stamp) 320 | # time-stamp-start: "scriptversion=" 321 | # time-stamp-format: "%:y-%02m-%02d.%02H" 322 | # time-stamp-end: "$" 323 | # End: 324 | -------------------------------------------------------------------------------- /navi2ch-face.el: -------------------------------------------------------------------------------- 1 | ;;; navi2ch-face.el --- face definitions for navi2ch -*- coding: iso-2022-7bit; -*- 2 | 3 | ;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2009 by Navi2ch 4 | ;; Project 5 | 6 | ;; Author: Taiki SUGAWARA 7 | ;; Keywords: network 2ch 8 | 9 | ;; This file is free software; you can redistribute it and/or modify 10 | ;; it under the terms of the GNU General Public License as published by 11 | ;; the Free Software Foundation; either version 2, or (at your option) 12 | ;; any later version. 13 | 14 | ;; This file is distributed in the hope that it will be useful, 15 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | ;; GNU General Public License for more details. 18 | 19 | ;; You should have received a copy of the GNU General Public License 20 | ;; along with GNU Emacs; see the file COPYING. If not, write to 21 | ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 22 | ;; Boston, MA 02111-1307, USA. 23 | 24 | ;;; Commentary: 25 | 26 | ;; 27 | 28 | ;;; Code: 29 | (provide 'navi2ch-face) 30 | (defconst navi2ch-face-ident 31 | "$Id$") 32 | 33 | (defgroup navi2ch-face nil 34 | "Navi2ch, Faces." 35 | :prefix "navi2ch-" 36 | :group 'navi2ch) 37 | 38 | (defface navi2ch-list-category-face 39 | '((((class color) (background light)) (:foreground "Gray30" :bold t)) 40 | (((class color) (background dark)) (:foreground "SkyBlue" :bold t))) 41 | "$B%+%F%4%j$N(B face" 42 | :group 'navi2ch-face) 43 | 44 | (defface navi2ch-list-board-name-face 45 | '((((class color) (background light)) (:foreground "Navy")) 46 | (((class color) (background dark)) (:foreground "SkyBlue"))) 47 | "$BHDL>$N(B face" 48 | :group 'navi2ch-face) 49 | 50 | (defface navi2ch-list-add-board-name-face 51 | '((((class color) (background light)) (:foreground "FireBrick" :bold t)) 52 | (((class color) (background dark)) (:foreground "cyan" :bold t))) 53 | "$BDI2C$5$l$?HDL>$N(B face" 54 | :group 'navi2ch-face) 55 | 56 | (defface navi2ch-list-change-board-name-face 57 | '((((class color) (background light)) (:foreground "DarkOliveGreen" :bold t)) 58 | (((class color) (background dark)) (:foreground "GreenYellow" :bold t))) 59 | "$BJQ99$5$l$?HDL>$N(B face" 60 | :group 'navi2ch-face) 61 | 62 | (defface navi2ch-bm-unread-face 63 | '((((class color) (background light)) (:foreground "DarkOliveGreen")) 64 | (((class color) (background dark)) (:foreground "GreenYellow"))) 65 | "$BFI$s$G$J$$%9%l$N(B face" 66 | :group 'navi2ch-face) 67 | 68 | (defface navi2ch-bm-view-face 69 | '((((class color) (background light)) (:foreground "FireBrick")) 70 | (((class color) (background dark)) (:foreground "cyan"))) 71 | "$BI=<($7$F$$$k%9%l$N(B face" 72 | :group 'navi2ch-face) 73 | 74 | (defface navi2ch-bm-cache-face 75 | '((((class color) (background light)) (:foreground "Navy")) 76 | (((class color) (background dark)) (:foreground "SkyBlue"))) 77 | "$BFI$s$@;v$,$"$k%9%l$N(B face" 78 | :group 'navi2ch-face) 79 | 80 | (defface navi2ch-bm-update-face 81 | '((((class color) (background light)) (:foreground "SaddleBrown")) 82 | (((class color) (background dark)) (:foreground "LightSkyBlue"))) 83 | "$B99?7$7$?%9%l$N(B face" 84 | :group 'navi2ch-face) 85 | 86 | (defface navi2ch-bm-down-face 87 | '((((class color) (background light)) (:foreground "Black" :bold t)) 88 | (((class color) (background dark)) (:foreground "White" :bold t))) 89 | "dat$BMn$A$7$?%9%l$N(B face" 90 | :group 'navi2ch-face) 91 | 92 | (defface navi2ch-bm-mark-face 93 | '((((class color) (background light)) (:foreground "Tomato3")) 94 | (((class color) (background dark)) (:foreground "tomato"))) 95 | "$B%^!<%/$7$?%9%l$N(B face" 96 | :group 'navi2ch-face) 97 | 98 | (defface navi2ch-bm-new-unread-face 99 | '((((class color) (background light)) (:foreground "DarkOliveGreen" :bold t)) 100 | (((class color) (background dark)) (:foreground "GreenYellow" :bold t))) 101 | "$B?7$7$$FI$s$G$J$$%9%l$N(B face" 102 | :group 'navi2ch-face) 103 | 104 | (defface navi2ch-bm-new-view-face 105 | '((((class color) (background light)) (:foreground "FireBrick" :bold t)) 106 | (((class color) (background dark)) (:foreground "PaleGreen" :bold t))) 107 | "$B?7$7$$I=<($7$F$$$k%9%l$N(B face" 108 | :group 'navi2ch-face) 109 | 110 | (defface navi2ch-bm-new-cache-face 111 | '((((class color) (background light)) (:foreground "Navy" :bold t)) 112 | (((class color) (background dark)) (:foreground "SkyBlue" :bold t))) 113 | "$B?7$7$$FI$s$@;v$,$"$k%9%l$N(B face" 114 | :group 'navi2ch-face) 115 | 116 | (defface navi2ch-bm-new-update-face 117 | '((((class color) (background light)) (:foreground "SaddleBrown" :bold t)) 118 | (((class color) (background dark)) (:foreground "LightSkyBlue" :bold t))) 119 | "$B?7$7$$99?7$7$?%9%l$N(B face" 120 | :group 'navi2ch-face) 121 | 122 | (defface navi2ch-bm-new-mark-face 123 | '((((class color) (background light)) (:foreground "Tomato3" :bold t)) 124 | (((class color) (background dark)) (:foreground "tomato" :bold t))) 125 | "$B?7$7$$%^!<%/$7$?%9%l$N(B face" 126 | :group 'navi2ch-face) 127 | 128 | (defface navi2ch-bm-updated-unread-face 129 | '((((class color) (background light)) (:foreground "DarkOliveGreen" :bold t)) 130 | (((class color) (background dark)) (:foreground "GreenYellow" :bold t))) 131 | "$B%l%9$,$"$C$?FI$s$G$J$$%9%l$N(B face" 132 | :group 'navi2ch-face) 133 | 134 | (defface navi2ch-bm-updated-view-face 135 | '((((class color) (background light)) (:foreground "FireBrick" :bold t)) 136 | (((class color) (background dark)) (:foreground "PaleGreen" :bold t))) 137 | "$B%l%9$,$"$C$?I=<($7$F$$$k%9%l$N(B face" 138 | :group 'navi2ch-face) 139 | 140 | (defface navi2ch-bm-updated-cache-face 141 | '((((class color) (background light)) (:foreground "Navy" :bold t)) 142 | (((class color) (background dark)) (:foreground "SkyBlue" :bold t))) 143 | "$B%l%9$,$"$C$?FI$s$@;v$,$"$k%9%l$N(B face" 144 | :group 'navi2ch-face) 145 | 146 | (defface navi2ch-bm-updated-update-face 147 | '((((class color) (background light)) (:foreground "SaddleBrown" :bold t)) 148 | (((class color) (background dark)) (:foreground "LightSkyBlue" :bold t))) 149 | "$B%l%9$,$"$C$?99?7$7$?%9%l$N(B face" 150 | :group 'navi2ch-face) 151 | 152 | (defface navi2ch-bm-updated-mark-face 153 | '((((class color) (background light)) (:foreground "Tomato3" :bold t)) 154 | (((class color) (background dark)) (:foreground "tomato" :bold t))) 155 | "$B%l%9$,$"$C$?%^!<%/$7$?%9%l$N(B face" 156 | :group 'navi2ch-face) 157 | 158 | (defface navi2ch-bm-seen-unread-face 159 | '((((class color) (background light)) (:foreground "DarkOliveGreen" :underline t)) 160 | (((class color) (background dark)) (:foreground "GreenYellow" :underline t))) 161 | "$B$9$G$K8+$?FI$s$G$J$$%9%l$N(B face" 162 | :group 'navi2ch-face) 163 | 164 | (defface navi2ch-bm-seen-view-face 165 | '((((class color) (background light)) (:foreground "FireBrick" :underline t)) 166 | (((class color) (background dark)) (:foreground "PaleGreen" :underline t))) 167 | "$B$9$G$K8+$?I=<($7$F$$$k%9%l$N(B face" 168 | :group 'navi2ch-face) 169 | 170 | (defface navi2ch-bm-seen-cache-face 171 | '((((class color) (background light)) (:foreground "Navy" :underline t)) 172 | (((class color) (background dark)) (:foreground "SkyBlue" :underline t))) 173 | "$B$9$G$K8+$?FI$s$@;v$,$"$k%9%l$N(B face" 174 | :group 'navi2ch-face) 175 | 176 | (defface navi2ch-bm-seen-update-face 177 | '((((class color) (background light)) (:foreground "SaddleBrown" :underline t)) 178 | (((class color) (background dark)) (:foreground "LightSkyBlue" :underline t))) 179 | "$B$9$G$K8+$?99?7$7$?%9%l$N(B face" 180 | :group 'navi2ch-face) 181 | 182 | (defface navi2ch-bm-seen-mark-face 183 | '((((class color) (background light)) (:foreground "Tomato3" :underline t)) 184 | (((class color) (background dark)) (:foreground "tomato" :underline t))) 185 | "$B$9$G$K8+$?%^!<%/$7$?%9%l$N(B face" 186 | :group 'navi2ch-face) 187 | 188 | (defface navi2ch-article-header-face 189 | '((((class color) (background light)) (:foreground "Gray30" :bold t)) 190 | (((class color) (background dark)) (:foreground "gray" :bold t))) 191 | "$B%X%C%@$N(B From $B$H$+$NItJ,$N(B face" 192 | :group 'navi2ch-face) 193 | 194 | (defface navi2ch-article-header-contents-face 195 | '((((class color) (background light)) (:foreground "Navy")) 196 | (((class color) (background dark)) (:foreground "yellow"))) 197 | "$B%X%C%@$NFbMF$NJ}$N(B face" 198 | :group 'navi2ch-face) 199 | 200 | (defface navi2ch-article-header-fusianasan-face 201 | '((((class color) (background light)) (:underline t :foreground "Navy")) 202 | (((class color) (background dark)) (:underline t :foreground "yellow"))) 203 | "$B$U$7$"$J$5$s$rI=<($9$k:]$N(B face" 204 | :group 'navi2ch-face) 205 | 206 | (defface navi2ch-article-link-face 207 | '((((class color) (background light)) (:bold t)) 208 | (((class color) (background dark)) (:bold t))) 209 | "$BF1$8%9%lCf$X$N%j%s%/$N(B face" 210 | :group 'navi2ch-face) 211 | 212 | (defface navi2ch-article-url-face 213 | '((((class color) (background light)) (:bold t)) 214 | (((class color) (background dark)) (:bold t))) 215 | "url $B$N(B face" 216 | :group 'navi2ch-face) 217 | 218 | (defface navi2ch-article-citation-face 219 | '((((class color) (background light)) (:foreground "FireBrick")) 220 | (((class color) (background dark)) (:foreground "HotPink1"))) 221 | "$B0zMQ$N(B face" 222 | :group 'navi2ch-face) 223 | 224 | (defface navi2ch-article-face 225 | nil 226 | "$B%9%l$N(B face" 227 | :group 'navi2ch-face) 228 | 229 | (defface navi2ch-article-auto-decode-face 230 | '((((class color) (background light)) (:background "gray90")) 231 | (((class color) (background dark)) (:foreground "gray10"))) 232 | "$B%9%l$N%(%s%3!<%I$5$l$?%;%/%7%g%s$N(B face" 233 | :group 'navi2ch-face) 234 | 235 | (defface navi2ch-article-message-separator-face 236 | '((((class color) (background light)) (:foreground "SpringGreen4")) 237 | (((class color) (background dark)) (:foreground "firebrick"))) 238 | "$B%l%9$N6h@Z$N(B face" 239 | :group 'navi2ch-face) 240 | 241 | (defface navi2ch-splash-screen-face 242 | '((((type tty) (background dark)) (:foreground "cyan")) 243 | (((class color) (background dark)) (:foreground "SkyBlue")) 244 | (((class color) (background light)) (:foreground "SteelBlue"))) 245 | "Face used for displaying splash screen." 246 | :group 'navi2ch-face) 247 | 248 | (defface navi2ch-message-link-face 249 | '((((class color) (background light)) (:bold t)) 250 | (((class color) (background dark)) (:bold t))) 251 | "$BF1$8%9%lCf$X$N%j%s%/$N(B face" 252 | :group 'navi2ch-face) 253 | 254 | (defface navi2ch-message-url-face 255 | '((((class color) (background light)) (:bold t)) 256 | (((class color) (background dark)) (:bold t))) 257 | "url $B$N(B face" 258 | :group 'navi2ch-face) 259 | 260 | (defface navi2ch-message-citation-face 261 | '((((class color) (background light)) (:foreground "FireBrick")) 262 | (((class color) (background dark)) (:foreground "HotPink1"))) 263 | "$B0zMQ$N(B face" 264 | :group 'navi2ch-face) 265 | 266 | (run-hooks 'navi2ch-face-load-hook) 267 | ;;; navi2ch-face.el ends here 268 | -------------------------------------------------------------------------------- /test/Makefile.in: -------------------------------------------------------------------------------- 1 | # Makefile.in generated by automake 1.9.6 from Makefile.am. 2 | # @configure_input@ 3 | 4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 5 | # 2003, 2004, 2005 Free Software Foundation, Inc. 6 | # This Makefile.in is free software; the Free Software Foundation 7 | # gives unlimited permission to copy and/or distribute it, 8 | # with or without modifications, as long as this notice is preserved. 9 | 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without 12 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 13 | # PARTICULAR PURPOSE. 14 | 15 | @SET_MAKE@ 16 | srcdir = @srcdir@ 17 | top_srcdir = @top_srcdir@ 18 | VPATH = @srcdir@ 19 | pkgdatadir = $(datadir)/@PACKAGE@ 20 | pkglibdir = $(libdir)/@PACKAGE@ 21 | pkgincludedir = $(includedir)/@PACKAGE@ 22 | top_builddir = .. 23 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 24 | INSTALL = @INSTALL@ 25 | install_sh_DATA = $(install_sh) -c -m 644 26 | install_sh_PROGRAM = $(install_sh) -c 27 | install_sh_SCRIPT = $(install_sh) -c 28 | INSTALL_HEADER = $(INSTALL_DATA) 29 | transform = $(program_transform_name) 30 | NORMAL_INSTALL = : 31 | PRE_INSTALL = : 32 | POST_INSTALL = : 33 | NORMAL_UNINSTALL = : 34 | PRE_UNINSTALL = : 35 | POST_UNINSTALL = : 36 | subdir = test 37 | DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in 38 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 39 | am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ 40 | $(top_srcdir)/configure.in 41 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 42 | $(ACLOCAL_M4) 43 | mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs 44 | CONFIG_CLEAN_FILES = 45 | SOURCES = 46 | DIST_SOURCES = 47 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 48 | ACLOCAL = @ACLOCAL@ 49 | AMTAR = @AMTAR@ 50 | AUTOCONF = @AUTOCONF@ 51 | AUTOHEADER = @AUTOHEADER@ 52 | AUTOMAKE = @AUTOMAKE@ 53 | AWK = @AWK@ 54 | CYGPATH_W = @CYGPATH_W@ 55 | DEFS = @DEFS@ 56 | ECHO_C = @ECHO_C@ 57 | ECHO_N = @ECHO_N@ 58 | ECHO_T = @ECHO_T@ 59 | EMACS = @EMACS@ 60 | EMACSLOADPATH = @EMACSLOADPATH@ 61 | INSTALL_DATA = @INSTALL_DATA@ 62 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ 63 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ 64 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ 65 | LIBOBJS = @LIBOBJS@ 66 | LIBS = @LIBS@ 67 | LTLIBOBJS = @LTLIBOBJS@ 68 | MAINT = @MAINT@ 69 | MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ 70 | MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ 71 | MAKEINFO = @MAKEINFO@ 72 | PACKAGE = @PACKAGE@ 73 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ 74 | PACKAGE_NAME = @PACKAGE_NAME@ 75 | PACKAGE_STRING = @PACKAGE_STRING@ 76 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ 77 | PACKAGE_URL = @PACKAGE_URL@ 78 | PACKAGE_VERSION = @PACKAGE_VERSION@ 79 | PATH_SEPARATOR = @PATH_SEPARATOR@ 80 | SET_MAKE = @SET_MAKE@ 81 | SHELL = @SHELL@ 82 | STRIP = @STRIP@ 83 | VERSION = @VERSION@ 84 | am__leading_dot = @am__leading_dot@ 85 | am__tar = @am__tar@ 86 | am__untar = @am__untar@ 87 | bindir = @bindir@ 88 | build_alias = @build_alias@ 89 | datadir = @datadir@ 90 | datarootdir = @datarootdir@ 91 | docdir = @docdir@ 92 | dvidir = @dvidir@ 93 | exec_prefix = @exec_prefix@ 94 | host_alias = @host_alias@ 95 | htmldir = @htmldir@ 96 | icondir = @icondir@ 97 | includedir = @includedir@ 98 | infodir = @infodir@ 99 | install_sh = @install_sh@ 100 | libdir = @libdir@ 101 | libexecdir = @libexecdir@ 102 | lispdir = @lispdir@ 103 | localedir = @localedir@ 104 | localstatedir = @localstatedir@ 105 | mandir = @mandir@ 106 | mkdir_p = @mkdir_p@ 107 | oldincludedir = @oldincludedir@ 108 | packagedir = @packagedir@ 109 | pdfdir = @pdfdir@ 110 | prefix = @prefix@ 111 | program_transform_name = @program_transform_name@ 112 | psdir = @psdir@ 113 | sbindir = @sbindir@ 114 | sharedstatedir = @sharedstatedir@ 115 | sysconfdir = @sysconfdir@ 116 | target_alias = @target_alias@ 117 | TESTS = test.sh 118 | all: all-am 119 | 120 | .SUFFIXES: 121 | $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) 122 | @for dep in $?; do \ 123 | case '$(am__configure_deps)' in \ 124 | *$$dep*) \ 125 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ 126 | && exit 0; \ 127 | exit 1;; \ 128 | esac; \ 129 | done; \ 130 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \ 131 | cd $(top_srcdir) && \ 132 | $(AUTOMAKE) --gnu test/Makefile 133 | .PRECIOUS: Makefile 134 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 135 | @case '$?' in \ 136 | *config.status*) \ 137 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ 138 | *) \ 139 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ 140 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 141 | esac; 142 | 143 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) 144 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 145 | 146 | $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 147 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 148 | $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) 149 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 150 | uninstall-info-am: 151 | tags: TAGS 152 | TAGS: 153 | 154 | ctags: CTAGS 155 | CTAGS: 156 | 157 | 158 | check-TESTS: $(TESTS) 159 | @failed=0; all=0; xfail=0; xpass=0; skip=0; \ 160 | srcdir=$(srcdir); export srcdir; \ 161 | list='$(TESTS)'; \ 162 | if test -n "$$list"; then \ 163 | for tst in $$list; do \ 164 | if test -f ./$$tst; then dir=./; \ 165 | elif test -f $$tst; then dir=; \ 166 | else dir="$(srcdir)/"; fi; \ 167 | if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ 168 | all=`expr $$all + 1`; \ 169 | case " $(XFAIL_TESTS) " in \ 170 | *" $$tst "*) \ 171 | xpass=`expr $$xpass + 1`; \ 172 | failed=`expr $$failed + 1`; \ 173 | echo "XPASS: $$tst"; \ 174 | ;; \ 175 | *) \ 176 | echo "PASS: $$tst"; \ 177 | ;; \ 178 | esac; \ 179 | elif test $$? -ne 77; then \ 180 | all=`expr $$all + 1`; \ 181 | case " $(XFAIL_TESTS) " in \ 182 | *" $$tst "*) \ 183 | xfail=`expr $$xfail + 1`; \ 184 | echo "XFAIL: $$tst"; \ 185 | ;; \ 186 | *) \ 187 | failed=`expr $$failed + 1`; \ 188 | echo "FAIL: $$tst"; \ 189 | ;; \ 190 | esac; \ 191 | else \ 192 | skip=`expr $$skip + 1`; \ 193 | echo "SKIP: $$tst"; \ 194 | fi; \ 195 | done; \ 196 | if test "$$failed" -eq 0; then \ 197 | if test "$$xfail" -eq 0; then \ 198 | banner="All $$all tests passed"; \ 199 | else \ 200 | banner="All $$all tests behaved as expected ($$xfail expected failures)"; \ 201 | fi; \ 202 | else \ 203 | if test "$$xpass" -eq 0; then \ 204 | banner="$$failed of $$all tests failed"; \ 205 | else \ 206 | banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \ 207 | fi; \ 208 | fi; \ 209 | dashes="$$banner"; \ 210 | skipped=""; \ 211 | if test "$$skip" -ne 0; then \ 212 | skipped="($$skip tests were not run)"; \ 213 | test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ 214 | dashes="$$skipped"; \ 215 | fi; \ 216 | report=""; \ 217 | if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ 218 | report="Please report to $(PACKAGE_BUGREPORT)"; \ 219 | test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ 220 | dashes="$$report"; \ 221 | fi; \ 222 | dashes=`echo "$$dashes" | sed s/./=/g`; \ 223 | echo "$$dashes"; \ 224 | echo "$$banner"; \ 225 | test -z "$$skipped" || echo "$$skipped"; \ 226 | test -z "$$report" || echo "$$report"; \ 227 | echo "$$dashes"; \ 228 | test "$$failed" -eq 0; \ 229 | else :; fi 230 | 231 | distdir: $(DISTFILES) 232 | @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ 233 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ 234 | list='$(DISTFILES)'; for file in $$list; do \ 235 | case $$file in \ 236 | $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ 237 | $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ 238 | esac; \ 239 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ 240 | dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ 241 | if test "$$dir" != "$$file" && test "$$dir" != "."; then \ 242 | dir="/$$dir"; \ 243 | $(mkdir_p) "$(distdir)$$dir"; \ 244 | else \ 245 | dir=''; \ 246 | fi; \ 247 | if test -d $$d/$$file; then \ 248 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ 249 | cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ 250 | fi; \ 251 | cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ 252 | else \ 253 | test -f $(distdir)/$$file \ 254 | || cp -p $$d/$$file $(distdir)/$$file \ 255 | || exit 1; \ 256 | fi; \ 257 | done 258 | check-am: all-am 259 | $(MAKE) $(AM_MAKEFLAGS) check-TESTS 260 | check: check-am 261 | all-am: Makefile 262 | installdirs: 263 | install: install-am 264 | install-exec: install-exec-am 265 | install-data: install-data-am 266 | uninstall: uninstall-am 267 | 268 | install-am: all-am 269 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am 270 | 271 | installcheck: installcheck-am 272 | install-strip: 273 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 274 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 275 | `test -z '$(STRIP)' || \ 276 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install 277 | mostlyclean-generic: 278 | 279 | clean-generic: 280 | 281 | distclean-generic: 282 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) 283 | 284 | maintainer-clean-generic: 285 | @echo "This command is intended for maintainers to use" 286 | @echo "it deletes files that may require special tools to rebuild." 287 | clean: clean-am 288 | 289 | clean-am: clean-generic mostlyclean-am 290 | 291 | distclean: distclean-am 292 | -rm -f Makefile 293 | distclean-am: clean-am distclean-generic 294 | 295 | dvi: dvi-am 296 | 297 | dvi-am: 298 | 299 | html: html-am 300 | 301 | info: info-am 302 | 303 | info-am: 304 | 305 | install-data-am: 306 | 307 | install-exec-am: 308 | 309 | install-info: install-info-am 310 | 311 | install-man: 312 | 313 | installcheck-am: 314 | 315 | maintainer-clean: maintainer-clean-am 316 | -rm -f Makefile 317 | maintainer-clean-am: distclean-am maintainer-clean-generic 318 | 319 | mostlyclean: mostlyclean-am 320 | 321 | mostlyclean-am: mostlyclean-generic 322 | 323 | pdf: pdf-am 324 | 325 | pdf-am: 326 | 327 | ps: ps-am 328 | 329 | ps-am: 330 | 331 | uninstall-am: uninstall-info-am 332 | 333 | .PHONY: all all-am check check-TESTS check-am clean clean-generic \ 334 | distclean distclean-generic distdir dvi dvi-am html html-am \ 335 | info info-am install install-am install-data install-data-am \ 336 | install-exec install-exec-am install-info install-info-am \ 337 | install-man install-strip installcheck installcheck-am \ 338 | installdirs maintainer-clean maintainer-clean-generic \ 339 | mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ 340 | uninstall-am uninstall-info-am 341 | 342 | # Tell versions [3.59,3.63) of GNU make to not export all variables. 343 | # Otherwise a system limit (for SysV at least) may be exceeded. 344 | .NOEXPORT: 345 | -------------------------------------------------------------------------------- /navi2ch-jbbs-shitaraba.el: -------------------------------------------------------------------------------- 1 | ;;; navi2ch-jbbs-shitaraba.el --- View jbbs-shitaraba module for Navi2ch. -*- coding: iso-2022-7bit; -*- 2 | 3 | ;; Copyright (C) 2002, 2003, 2004, 2006 by Navi2ch Project 4 | 5 | ;; Author: 6 | ;; Part5 $B%9%l$N(B 509 $B$NL>L5$7$5$s(B 7 | ;; 8 | 9 | ;; Keywords: 2ch, network 10 | 11 | ;; This file is free software; you can redistribute it and/or modify 12 | ;; it under the terms of the GNU General Public License as published by 13 | ;; the Free Software Foundation; either version 2, or (at your option) 14 | ;; any later version. 15 | 16 | ;; This file is distributed in the hope that it will be useful, 17 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | ;; GNU General Public License for more details. 20 | 21 | ;; You should have received a copy of the GNU General Public License 22 | ;; along with GNU Emacs; see the file COPYING. If not, write to 23 | ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 24 | ;; Boston, MA 02111-1307, USA. 25 | 26 | ;;; Commentary: 27 | 28 | ;; $B#J#B#B#S!w$7$?$i$P$N;EMM$O2<5-;2>H!#(B 29 | ;; http://jbbs.shitaraba.com/bbs/read.cgi/computer/351/1040452916/126-140n 30 | 31 | ;;; Code: 32 | (provide 'navi2ch-jbbs-shitaraba) 33 | (defconst navi2ch-jbbs-shitaraba-ident 34 | "$Id$") 35 | 36 | (eval-when-compile 37 | (require 'cl)) 38 | 39 | (require 'navi2ch-util) 40 | (require 'navi2ch-multibbs) 41 | 42 | (eval-when-compile 43 | (navi2ch-defalias-maybe 'coding-system-list 'ignore)) 44 | 45 | (defvar navi2ch-js-func-alist 46 | '((bbs-p . navi2ch-js-p) 47 | (subject-callback . navi2ch-js-subject-callback) 48 | (article-update . navi2ch-js-article-update) 49 | (article-to-url . navi2ch-js-article-to-url) 50 | (url-to-board . navi2ch-js-url-to-board) 51 | (url-to-article . navi2ch-js-url-to-article) 52 | (send-message . navi2ch-js-send-message) 53 | (send-success-p . navi2ch-js-send-message-success-p) 54 | (error-string . navi2ch-js-send-message-error-string) 55 | (board-update . navi2ch-js-board-update))) 56 | 57 | (defvar navi2ch-js-coding-system 58 | (or (car (memq 'eucjp-ms (coding-system-list))) 59 | 'euc-japan)) 60 | 61 | (defvar navi2ch-js-variable-alist 62 | (list (cons 'coding-system navi2ch-js-coding-system))) 63 | 64 | (navi2ch-multibbs-regist 'jbbs-shitaraba 65 | navi2ch-js-func-alist 66 | navi2ch-js-variable-alist) 67 | 68 | (defvar navi2ch-js-host-list '("jbbs.shitaraba.com" 69 | "jbbs.shitaraba.net" 70 | "jbbs.livedoor.com" 71 | "jbbs.livedoor.jp")) 72 | 73 | ;;------------- 74 | 75 | (defun navi2ch-js-p (uri) 76 | "URI $B$,(BJBBS$B!w$7$?$i$P$J$i(B non-nil $B$rJV$9!#(B" 77 | (let ((list navi2ch-js-host-list) 78 | host result) 79 | (while (and list (not result)) 80 | (setq host (car list)) 81 | (setq list (cdr list)) 82 | (setq result (string-match (format "^http://%s" (regexp-quote host)) 83 | uri))) 84 | result)) 85 | 86 | (navi2ch-multibbs-defcallback navi2ch-js-subject-callback (jbbs-shitaraba) 87 | "subject.txt $B$r$B=q$-$3$_$^$7$?!#(B" str) 187 | (string= "" str)))) 188 | 189 | (defun navi2ch-js-send-message-error-string (proc) 190 | (let ((str (decode-coding-string (navi2ch-net-get-content proc) 191 | navi2ch-js-coding-system))) 192 | (cond ((string-match "$B#E#R#R#O#R!'(B\\([^<]+\\)" str) 193 | (match-string 1 str)) 194 | ((string-match "\\([^<]+\\)" str) 195 | (match-string 1 str))))) 196 | 197 | (defun navi2ch-js-article-to-url-subr 198 | (string board article &optional start end nofirst) 199 | "BOARD, ARTICLE $B$+$i(B STRING.cgi $B$N(B url $B$KJQ49!#(B 200 | START, END, NOFIRST $B$GHO0O$r;XDj$9$k!#(B" 201 | (let ((url (concat (navi2ch-js-get-cgi-url string board) 202 | (cdr (assq 'artid article)) 203 | "/"))) 204 | (if (numberp start) 205 | (setq start (number-to-string start))) 206 | (if (numberp end) 207 | (setq end (number-to-string end))) 208 | (if (equal start end) 209 | (concat url start) 210 | (concat url 211 | start (and (or start end) "-") end 212 | (and nofirst "n"))))) 213 | 214 | (defun navi2ch-js-article-to-url (board article &optional start end nofirst) 215 | "BOARD, ARTICLE $B$+$i(B read.cgi $B$N(B url $B$KJQ49!#(B 216 | START, END, NOFIRST $B$GHO0O$r;XDj$9$k(B" 217 | (navi2ch-js-article-to-url-subr "read" 218 | board article start end nofirst)) 219 | 220 | (defun navi2ch-js-article-to-rawmode-url (board article &optional start end nofirst) 221 | "BOARD, ARTICLE $B$+$i(B rawmode.cgi $B$N(B url $B$KJQ49!#(B 222 | START, END, NOFIRST $B$GHO0O$r;XDj$9$k(B" 223 | (navi2ch-js-article-to-url-subr "rawmode" 224 | board article start end nofirst)) 225 | 226 | ;;------------------ 227 | 228 | (defvar navi2ch-js-parse-regexp 229 | ;; $B%l%9HV(B $BL>A0(B $B%a!<%k(B $BEj9FF|;~(B $BK\J8(B $B%9%l%?%$%H%k(B ID/$B%j%b%[(B 230 | "\\([0-9]+\\)<>\\(.*\\)<>\\(.*\\)<>\\(.*\\)<>\\(.*\\)<>\\(.*\\)<>\\(.*\\)\n") 231 | 232 | (defun navi2ch-js-parse () 233 | (let ((case-fold-search t)) 234 | (re-search-forward navi2ch-js-parse-regexp nil t))) 235 | 236 | (navi2ch-multibbs-defcallback navi2ch-js-article-callback 237 | (jbbs-shitaraba &optional start) 238 | (let ((i (or start 1)) 239 | (beg (point)) 240 | num name mail date contents subject id) 241 | (while (navi2ch-js-parse) 242 | (setq num (match-string 1) 243 | name (match-string 2) 244 | mail (match-string 3) 245 | date (match-string 4) 246 | contents (match-string 5) 247 | subject (match-string 6) 248 | id (match-string 7)) 249 | (delete-region beg (match-end 0)) 250 | (while (< i (string-to-number num)) 251 | (insert "$B$"$\!<$s(B<>$B$"$\!<$s(B<>$B$"$\!<$s(B<>$B$"$\!<$s(B<>\n") 252 | (setq i (1+ i))) 253 | (insert (format "%s<>%s<>%s%s<>%s<>%s\n" 254 | name 255 | (or mail "") 256 | date 257 | (if (= 0 (length id)) "" (concat " ID:" id)) 258 | contents 259 | (or subject ""))) 260 | (setq i (1+ i)) 261 | (setq beg (point))))) 262 | 263 | (defconst navi2ch-js-url-regexp 264 | ;; prefix $B%+%F%4%j(B BBS$BHV9f(B 265 | "\\`\\(.+\\)/\\([^/]+\\)/\\([^/]+\\)/\\'") 266 | 267 | (defun navi2ch-js-get-cgi-url (string board) 268 | "STRING.cgi $B$N(B url $B$rJV$9!#(B" 269 | (let ((uri (navi2ch-board-get-uri board))) 270 | (and (string-match navi2ch-js-url-regexp uri) 271 | (format "%s/bbs/%s.cgi/%s/%s/" 272 | (match-string 1 uri) 273 | string 274 | (match-string 2 uri) 275 | (match-string 3 uri))))) 276 | 277 | (defun navi2ch-js-get-dir (board) 278 | "write.cgi $B$KEO$9(B DIR $B%Q%i%a!<%?$rJV$9!#(B" 279 | (let ((uri (navi2ch-board-get-uri board))) 280 | (and (string-match navi2ch-js-url-regexp uri) 281 | (match-string 2 uri)))) 282 | 283 | (defun navi2ch-js-board-update (board) 284 | (let ((url (navi2ch-board-get-url board)) 285 | (file (navi2ch-board-get-file-name board)) 286 | (time (cdr (assq 'time board))) 287 | (func (navi2ch-multibbs-subject-callback board))) 288 | (navi2ch-net-update-file url file time func))) 289 | 290 | ;;; navi2ch-jbbs-shitaraba.el ends here 291 | --------------------------------------------------------------------------------