From: teranisi Date: Thu, 30 Jan 2003 00:53:13 +0000 (+0000) Subject: Synch up with main trunk. X-Git-Tag: elmo-mark-restart~78 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=9f8461b1d4b90f5204c5703c9295779fdecf744b;p=elisp%2Fwanderlust.git Synch up with main trunk. --- diff --git a/ChangeLog b/ChangeLog index 990d0f9..4135398 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,60 @@ +2003-01-17 TAKAHASHI Kaoru + + * WL-MK (test-wl): Added `make-wl-news'. + (check-wl): Added (provide 'wl-news) before load wl-news.el.in. + +2003-01-13 Yoichi NAKAYAMA + + * WL-MK (wl-info-lang): Skip "ja" for non-mule. + (wl-news-lang): Ditto. + +2002-12-28 TAKAHASHI Kaoru + + * WL-MK (test-wl, check-wl): Load wl-news.el.in. + +2002-12-27 TAKAHASHI Kaoru + + * INSTALL, INSTALL.ja: Updated recommended version of FLIM to 1.14.5. + +2002-12-21 Yoichi NAKAYAMA + + * WL-MK (make-wl-news): Don't add wl-news-lang setting into + wl-news.el here. + +2002-12-20 Kenichi OKADA + + * WL-MK (make-wl-news): Fix coding system. + +2002-12-20 Kenichi OKADA + + * WL-MK (wl-news-parse-news-subr): Decide + coding-system. + +2002-12-20 Kenichi OKADA + + * WL-MK (wl-news-lang): New variable. + (wl-news-news-file): Merge `wl-news-news-file' + and `wl-news-news-file-ja'. + (wl-news-search-regexp): New variable. + (wl-news-news-file): New function. + (wl-news-parse-news): Merge `wl-news-parse-news' + and `wl-news-parse-news-ja'. + (wl-news-parse-news-subr): New function. + +2002-12-20 Kenichi OKADA + + * WL-CFG (wl-news-lang): New variable. + +2002-12-20 Kenichi OKADA + + * WL-MK (make-wl-news): New function. + (wl-news-parse-news): New function. + (wl-news-parse-news-ja): New function. + (compile-wl-package): Do `make-wl-news'. + (wl-news-news-file): New variable. + (wl-news-news-file-ja): New variable. + (wl-news-filename: New variable. + 2002-12-11 Yuuichi Teranishi * 2.10.0 - "Venus" diff --git a/INSTALL b/INSTALL index 1e7a8f9..d19d9eb 100644 --- a/INSTALL +++ b/INSTALL @@ -34,13 +34,13 @@ Select MIME Module (a) XEmacs 21.1 or later - APEL 10.4, FLIM 1.14.4, SEMI 1.14.5 + APEL 10.4, FLIM 1.14.5, SEMI 1.14.5 Installation as a XEmacs package, If possible. (b) Emacs 20.4 or later - APEL 10.4, FLIM 1.14.4, SEMI 1.14.5 + APEL 10.4, FLIM 1.14.5, SEMI 1.14.5 (c) Emacs 20.1 to 20.3 diff --git a/INSTALL.ja b/INSTALL.ja index 8aa9e4e..39fb62e 100644 --- a/INSTALL.ja +++ b/INSTALL.ja @@ -33,13 +33,13 @@ MIME$BMQ%b%8%e!<%k$NA*Br(B (a) XEmacs 21.1 $B0J9_(B - APEL 10.4, FLIM 1.14.4, SEMI 1.14.5 + APEL 10.4, FLIM 1.14.5, SEMI 1.14.5 $B2DG=$J$i$P(B XEmacs $B$N%Q%C%1!<%8$H$7$F%$%s%9%H!<%k$9$k$3$H$r$*4+$a$7$^$9!#(B (b) Emacs 20.4 $B0J9_(B - APEL 10.4, FLIM 1.14.4, SEMI 1.14.5 + APEL 10.4, FLIM 1.14.5, SEMI 1.14.5 (c) Emacs 20.1$B!A(B20.3 diff --git a/Makefile b/Makefile index 68e7a7a..bea06b5 100644 --- a/Makefile +++ b/Makefile @@ -46,7 +46,7 @@ uninstall-elc: $(EMACS) $(FLAGS) -l WL-MK -f uninstall-wl-package $(LISPDIR) $(PIXMAPDIR) clean-elc: - rm -f wl/*.elc wl/*~ wl/auto-autoloads.el wl/custom-load.el elmo/*.elc utils/*.elc utils/hmac/lisp/*.elc + rm -f wl/*.elc wl/*~ wl/auto-autoloads.el wl/custom-load.el wl/wl-news.el elmo/*.elc utils/*.elc utils/hmac/lisp/*.elc package: $(XEMACS) $(FLAGS) -l WL-MK -f compile-wl-package-xmas $(PACKAGEDIR) $(PIXMAPDIR) diff --git a/NEWS b/NEWS index ffbb7e1..0222792 100644 --- a/NEWS +++ b/NEWS @@ -1,10 +1,22 @@ Wanderlust NEWS -- User-visible changes in Wanderlust. +** Show contents of NEWS(.ja) when you start Wanderlust newer than the + one you used previously. + +** Default values of wl-draft-reply-*-list are changed. + See samples/en/dot.wl for old values. + +** wl-draft-reply-myself-*-list are abolished and integrated into + wl-draft-reply-*-list. + ** Changed the way to specify configuration of draft buffer window. You can choose keep, full or split as values of wl-draft-buffer-style and wl-draft-reply-buffer-style. -* Changes in 2.10.0 from 2.8.1. +** Commands to verify/decrypt non-MIME PGP message are added. + C-c:v, C-c:d in message buffer to verify or decrypt respectively. + +* Changes in 2.10.0 from 2.8.1 ** You can alter the format of summary lines. Specify format by wl-summary-line-format. If you want to change ones @@ -32,6 +44,9 @@ Wanderlust NEWS -- User-visible changes in Wanderlust. ** Now you can rename access group folders. +** You can specify ON/OFF of thread view for newly created summary. + Set wl-summary-default-view, wl-summary-default-view-alist. + ** Temporary marks are kept when you exit from sticky summary by q or g. ** Key bindings concerning the sticky summary have been changed. @@ -57,7 +72,7 @@ Wanderlust NEWS -- User-visible changes in Wanderlust. It is binded as "D" in message buffer. ** You can easily configure server settings to post news article. - Set wl-nntp-posting-config-alist appropriately. See info for an example. + Set wl-nntp-posting-config-alist appropriately. See Info for an example. ** You can specify some function in wl-draft-reply-with-argument-list etc. for setting the recipients in draft by the return value of it. @@ -156,7 +171,8 @@ Wanderlust NEWS -- User-visible changes in Wanderlust. the actual message itself is deleted. Please visit the 'mark folder to review the messages with the "$" mark. -* Version 2.6.1 is basically a bug fix version of 2.6.0. +* Changes in 2.6.1 from 2.6.0 + Version 2.6.1 is basically a bug fix version of 2.6.0. ** Fixed a problem that Emacs 21 causes `Recursive load...' error. @@ -169,7 +185,7 @@ Wanderlust NEWS -- User-visible changes in Wanderlust. ** Some other fixes. -* Changes in 2.6.0 from 2.4.1. +* Changes in 2.6.0 from 2.4.1 ** FLIM 1.13.x is not supported any longer. Please install FLIM 1.14.1 or later. @@ -197,7 +213,8 @@ Wanderlust NEWS -- User-visible changes in Wanderlust. ** Many bug fixes. -* Version 2.4.1 is basically a bug fix version of 2.4.0. +* Changes in 2.4.1 from 2.4.0 + Version 2.4.1 is basically a bug fix version of 2.4.0. ** Wanderlust 2.4.1 now works on FLIM 1.14.x. @@ -215,7 +232,7 @@ Example: should be changed to (setq elmo-default-imap4-authenticate-type 'clear) -* Changes in 2.4.0 from 1.1.1. +* Changes in 2.4.0 from 1.1.1 ** Version Number The version numbering convention for Wanderlust is changed. @@ -289,7 +306,7 @@ re-numbers the messages. *** Complex condition can be specified for filter folder AND condition, OR condition, NOT condition, and their combination can be - specified. Syntax of the condition part is changed. See info for details. + specified. Syntax of the condition part is changed. See Info for details. Caution for those who upgrade from 1.1.1: By this change, saving directory for the msgdb of filter folder is altered. @@ -382,7 +399,8 @@ Less colors are used by DEMO pixmap. Emacsen on character based terminal also display suitable DEMO. -* Version 1.1.1 is a bug fix version of 1.1.0 with minor user-visible changes. +* Changes in 1.1.1 from 1.1.0 + Version 1.1.1 is a bug fix version of 1.1.0 with minor user-visible changes. ** Development on the CVS server is started. @@ -401,7 +419,7 @@ Emacsen on character based terminal also display suitable DEMO. Progress gauge is displayed while processing in the Emacsen with progress gauge feature. -* Changes in version 1.1.0 from 1.0.3. +* Changes in 1.1.0 from 1.0.3 ** Install diff --git a/NEWS.ja b/NEWS.ja index fe492ec..9eccb66 100644 --- a/NEWS.ja +++ b/NEWS.ja @@ -1,9 +1,21 @@ Wanderlust NEWS ($BF|K\8lHG(B) -- User-visible changes in Wanderlust. +** $BA0$K;H$C$F$$$?$b$N$h$j?7$7$$(B Wanderlust $B$r5/F0$9$k$H(B NEWS(.ja) $B$NFbMF$r(B + $BI=<($7$^$9!#(B + +** wl-draft-reply-*-list $B$N=i4|CM$,JQ99$5$l$^$7$?!#(B + $B0JA0$N@_Dj$O!"(Bsamples/ja/dot.wl $B$r;2>H$7$F2<$5$$!#(B + +** wl-draft-reply-myself-*-list $B$OGQ;_$5$l!"(Bwl-draft-reply-*-list $B$KE}9g(B + $B$5$l$^$7$?!#(B + ** $B%I%i%U%H%P%C%U%!%&%#%s%I%&$NG[CV$N;XDj$N;EJ}$,JQ99$5$l$^$7$?!#(B wl-draft-buffer-style $B$H(B wl-draft-reply-buffer-style $B$K(B keep,full,split $B$N$$$:$l$+$r;XDj$7$^$9!#(B +** non-MIME PGP $B%a%C%;!<%8$N8!>Z!"I|9f2=$N$?$a$N%3%^%s%I$,DI2C$5$l$^$7$?!#(B + $B%a%C%;!<%8%P%C%U%!$K$*$$$F(B C-c:v, C-c:d $B$G$=$l$>$l8!>Z!"I|9f2=$7$^$9!#(B + * 2.8.1 $B$+$i(B 2.10.0 $B$X$NJQ99E@(B ** $B%5%^%j9T$NI=<(7A<0$rJQ99$G$-$k$h$&$K$J$j$^$7$?!#(B @@ -33,6 +45,9 @@ Wanderlust NEWS ($BF|K\8lHG(B) -- User-visible changes in Wanderlust. ** $B%"%/%;%9%0%k!<%W%U%)%k%@$N2~L>$,=PMh$k$h$&$K$J$j$^$7$?!#(B +** $B?75,%5%^%j$KBP$9$k%9%l%C%II=<($N(B ON/OFF $B$r;XDj$G$-$k$h$&$K$J$j$^$7$?!#(B + wl-summary-default-view, wl-summary-default-view-alist $B$r@_Dj$7$F2<$5$$!#(B + ** $B%9%F%#%C%-!<%5%^%j$r(B q $B$d(B g $B$GH4$1$k:]$K!"0l;~E*%^!<%/$rJ];}$9$k$h$&$K(B $B$J$j$^$7$?!#(B @@ -59,7 +74,7 @@ Wanderlust NEWS ($BF|K\8lHG(B) -- User-visible changes in Wanderlust. $B%a%C%;!<%8%P%C%U%!$G(B "D" $B$K%P%$%s%I$5$l$F$$$^$9!#(B ** $B%K%e!<%95-;v$rEj9F$9$k%5!<%P$r4JC1$K@_Dj$G$-$k$h$&$K$J$j$^$7$?!#(B - info $B$NNc$K=,$C$F(B wl-nntp-posting-config-alist $B$r@_Dj$7$F2<$5$$!#(B + Info $B$NNc$K=,$C$F(B wl-nntp-posting-config-alist $B$r@_Dj$7$F2<$5$$!#(B ** $BJQ?t(B wl-draft-reply-with-argument-list $BEy$G!"4X?t$NJV$jCM$+$i08@h$r(B $B7h$a$i$l$k$h$&$K$J$j$^$7$?!#(B @@ -159,7 +174,8 @@ Wanderlust NEWS ($BF|K\8lHG(B) -- User-visible changes in Wanderlust. "$" $B%^!<%/$NIU$$$?%a%C%;!<%8$r8+D>$7$?$$>l9g$O(B 'mark $B%U%)%k%@$r;2>H$7$F(B $B$/$@$5$$!#(B -* 2.6.1 $B$O(B 2.6.0 $B$N=$@5HG$G$9!#(B +* 2.6.0 $B$+$i(B 2.6.1 $B$X$NJQ99E@(B + 2.6.1 $B$O(B 2.6.0 $B$N=$@5HG$G$9!#(B ** Emacs 21 $B$G(B Recursive load... $B$H=P$kIT6q9g$,=$@5$5$l$^$7$?!#(B @@ -199,7 +215,8 @@ Wanderlust NEWS ($BF|K\8lHG(B) -- User-visible changes in Wanderlust. ** $BB?$/$N%P%0%U%#%C%/%9(B -* 2.4.1 $B$O(B 2.4.0 $B$N=$@5HG$G$9!#(B +* 2.4.0 $B$+$i(B 2.4.1 $B$X$NJQ99E@(B + 2.4.1 $B$O(B 2.4.0 $B$N=$@5HG$G$9!#(B ** FLIM 1.14.x $B>e$G$bF0:n$9$k$h$&$K$J$j$^$7$?!#(B @@ -216,7 +233,7 @@ Wanderlust NEWS ($BF|K\8lHG(B) -- User-visible changes in Wanderlust. (setq elmo-default-imap4-authenticate-type 'clear) $B$KJQ99$9$kI,MW$,$"$j$^$9!#(B -* 1.1.1 $B$+$i(B version 2.4.0 $B$X$NJQ99E@(B +* 1.1.1 $B$+$i(B 2.4.0 $B$X$NJQ99E@(B ** $B%P!<%8%g%sHV9f(B $B%P!<%8%g%sHV9f$NIU$1J}$,JQ$o$j$^$7$?!#(B @@ -285,7 +302,7 @@ Maildir $B$N%5%^%j$G(B M-x wl-summary-pack-number $B$rr7o;XDj$r;XDj$G$-$k$h$&$K$J$j$^$7$?!#(B AND $B>r7o!"(BOR $B>r7o!"H]Dj>r7o!"$*$h$S$=$l$i$NAH9g$;$r;XDj$G$-$^$9!#(B $B$3$l$K$H$b$J$$!">r7o;XDjItJ,$N%7%s%?%C%/%9$,JQ99$5$l$^$7$?!#(B -$B$/$o$7$/$O(B info $B$r8fMw2<$5$$!#(B +$B$/$o$7$/$O(B Info $B$r8fMw2<$5$$!#(B $BCm0U!'(B1.1.1 $B$+$i0\9T$5$l$kJ}$X(B $B>e5-JQ99$KH<$$!"%U%#%k%?%U%)%k%@$N(B msgdb $B$NCV$->l=j$,JQ$o$j$^$7$?!#(B @@ -378,7 +395,8 @@ wl-message-visible-field-list $B$G!"(BWanderlust $B%l%Y%k$G@_Dj$,2DG=(B $B$J$j$^$7$?!#(B -* 1.1.1 $B$O(B 1.1.0 $B$N%P%0=$@5HG$G$9!#$$$/$D$+$N:Y$+$$=$@5$,2C$o$C$F$$$^$9!#(B +* 1.1.0 $B$+$i(B 1.1.1 $B$X$NJQ99E@(B + 1.1.1 $B$O(B 1.1.0 $B$N%P%0=$@5HG$G$9!#$$$/$D$+$N:Y$+$$=$@5$,2C$o$C$F$$$^$9!#(B ** CVS $B%5!<%P>e$G$N3+H/$,;O$a$i$l$^$7$?!#(B @@ -394,7 +412,7 @@ wl-message-visible-field-list $B$G!"(BWanderlust $B%l%Y%k$G@_Dj$,2DG=(B progress gauge $B$NI=<(5!G=$r$b$D(B Emacs $B$G$O!"=hM}$N?JD=$,(B progress gauge $B$K(B $BI=<($5$l$k$h$&$K$J$j$^$7$?!#(B -* 1.0.3 $B$+$i(B version 1.1.0 $B$X$NJQ99E@(B +* 1.0.3 $B$+$i(B 1.1.0 $B$X$NJQ99E@(B ** $B%$%s%9%H!<%k(B diff --git a/WL-CFG b/WL-CFG index e3e1dc4..937a9ed 100644 --- a/WL-CFG +++ b/WL-CFG @@ -15,6 +15,9 @@ ;; If you only need manual in English, uncomment following line. ;(setq wl-info-lang "en") +;; Set language for news file ("ja" or "en", both in default). +;(setq wl-news-lang '("ja" "en")) + ;; if you want to install wl modules to the subdirectory other than "wl" ;; under LISPDIR, set following variables. ;(setq WL_PREFIX "your-path") ; default is "wl" diff --git a/WL-ELS b/WL-ELS index 4a0d9ca..6d68da0 100644 --- a/WL-ELS +++ b/WL-ELS @@ -10,7 +10,7 @@ wl wl-folder wl-summary wl-message wl-vars wl-draft wl-util wl-version wl-address wl-addrmgr wl-highlight wl-demo wl-refile wl-thread - wl-fldmgr wl-expire wl-template wl-score wl-acap + wl-fldmgr wl-expire wl-template wl-score wl-acap wl-news )) (defconst ELMO-MODULES '( diff --git a/WL-MK b/WL-MK index c42e4f3..a3cd3a0 100644 --- a/WL-MK +++ b/WL-MK @@ -28,9 +28,19 @@ (defconst wl-en-info "wl.info") (defconst wl-en-texi "wl.texi") -(defvar wl-info-lang '("ja" "en") +(defvar wl-info-lang (if (featurep 'mule) '("ja" "en") '("en")) "The language of info file (\"ja\" or \"en\").") +;;; NEWS +(defvar wl-news-lang (if (featurep 'mule) '("ja" "en") '("en")) + "The language of news file (\"ja\" or \"en\").") +(defconst wl-news-news-file '(("en" "NEWS") + ("ja" "NEWS.ja"))) +(defconst wl-news-search-regexp + '(("en" "^\\* Changes in \\([0-9.]*\\) from") + ("ja" "^\\* [0-9.]* $B$+$i(B \\([0-9.]*\\) $B$X$NJQ99E@(B"))) +(defconst wl-news-filename "wl-news.el") + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'cl) @@ -164,6 +174,7 @@ (defun test-wl () "Run test suite for developer." (config-wl-package) + (make-wl-news) (require 'lunit) (let ((files (directory-files "tests" t "^test-.*\\.el$")) (suite (lunit-make-test-suite))) @@ -181,6 +192,9 @@ (defun check-wl () "Check user environment. Not for developer." (config-wl-package) + ;; Avoid load error + (provide 'wl-news) + (load "wl-news.el.in") (require 'lunit) (let ((files (directory-files "tests" t "^check-.*\\.el$")) (suite (lunit-make-test-suite))) @@ -221,6 +235,7 @@ (defun compile-wl-package () (config-wl-package) + (make-wl-news) (mapcar '(lambda (x) (compile-elisp-modules (cdr x) (car x))) @@ -318,6 +333,7 @@ ;; from SEMI-MK (defun compile-wl-package-xmas () (config-wl-package-xmas) + (make-wl-news) (setq autoload-package-name "wl") (add-to-list 'command-line-args-left WLDIR) (batch-update-directory) @@ -434,6 +450,82 @@ (wl-texinfo-install)) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; wl-news stuff + +(defun wl-news-news-file (lang) + (cadr (assoc lang wl-news-news-file))) + +(defun wl-news-check-newer (out-filename news-lang) + (let ((lang news-lang) + ret) + (while (car lang) + (if (file-newer-than-file-p + (wl-news-news-file (car lang)) out-filename) + (setq ret t)) + (setq lang (cdr lang))) + ret)) + +(defun make-wl-news () + (let ((in-filename + (expand-file-name (concat wl-news-filename ".in") WLDIR)) + (out-filename + (expand-file-name wl-news-filename WLDIR)) + (wl-news-lang (if (listp wl-news-lang) + wl-news-lang + (list wl-news-lang)))) + (if (or (file-newer-than-file-p in-filename out-filename) + (wl-news-check-newer out-filename wl-news-lang)) + (with-temp-buffer + (save-excursion + (insert-file-contents in-filename) + (goto-char (point-min)) + (unless (re-search-forward "^;;; -\\*- news-list -\\*-" nil t) + (error "Invalid wl-news.el.in")) + (forward-line 2) + (if wl-news-lang + (progn + (insert "(defconst wl-news-news-alist\n '") + (prin1 (wl-news-parse-news wl-news-lang) (current-buffer)) + (insert ")\n")) + (insert "(defconst wl-news-news-alist nil)\n\n")) + (let ((buffer-file-coding-system (mime-charset-to-coding-system 'x-ctext))) + (write-region (point-min) (point-max) out-filename))))))) + +(defun wl-news-parse-news (lang) + (let (news-list) + (while (car lang) + (setq news-list (cons + (cons (car lang) (wl-news-parse-news-subr (car lang))) + news-list)) + (setq lang (cdr lang))) + news-list)) + +(defun wl-news-parse-news-subr (lang) + (let ((filename (wl-news-news-file lang)) + (reg (cadr (assoc lang wl-news-search-regexp))) + news-list) + (if (and filename reg) + (with-temp-buffer + (insert-file-contents filename) + (while (re-search-forward reg nil t) + (let ((beg (match-beginning 0)) + (version-tmp (split-string (match-string 1) "\\.")) + version news-string end) + (while version-tmp + (setq version (append version (list (string-to-int (car version-tmp))))) + (setq version-tmp (cdr version-tmp))) + (re-search-forward "^\\(\\* \\| \\)" nil t) + (goto-char (- (match-beginning 0) 1)) + (setq end (point)) + (setq news-string (buffer-substring beg end)) + (setq news-list + (append news-list + (list (cons version news-string)))))))) + news-list)) + + + ;;; ToDo ;;; * MORE refine code (^_^; diff --git a/doc/texinfo.tex b/doc/texinfo.tex index c85d329..7c912ca 100644 --- a/doc/texinfo.tex +++ b/doc/texinfo.tex @@ -3,10 +3,10 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2002-11-25.11} +\def\texinfoversion{2003-01-27.08} % % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, -% 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. % % This texinfo.tex file is free software; you can redistribute it and/or % modify it under the terms of the GNU General Public License as @@ -29,9 +29,8 @@ % % Please try the latest version of texinfo.tex before submitting bug % reports; you can get the latest version from: -% ftp://ftp.gnu.org/gnu/texinfo.tex +% ftp://ftp.gnu.org/gnu/texinfo/texinfo.tex % (and all GNU mirrors, see http://www.gnu.org/order/ftp.html) -% ftp://texinfo.org/texinfo/texinfo.tex % ftp://tug.org/tex/texinfo.tex % (and all CTAN mirrors, see http://www.ctan.org), % and /home/gd/gnu/doc/texinfo.tex on the GNU machines. @@ -56,9 +55,10 @@ % The extra TeX runs get the cross-reference information correct. % Sometimes one run after texindex suffices, and sometimes you need more % than two; texi2dvi does it as many times as necessary. -% -% It is possible to adapt texinfo.tex for other languages. You can get -% the existing language-specific files from the full Texinfo distribution. +% +% It is possible to adapt texinfo.tex for other languages, to some +% extent. You can get the existing language-specific files from the +% full Texinfo distribution. \message{Loading texinfo [version \texinfoversion]:} @@ -141,6 +141,18 @@ \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi \ifx\putwordDeftypefun\undefined\gdef\putwordDeftypefun{Function}\fi +% In some macros, we cannot use the `\? notation---the left quote is +% in some cases the escape char. +\chardef\colonChar = `\: +\chardef\commaChar = `\, +\chardef\dotChar = `\. +\chardef\equalChar = `\= +\chardef\exclamChar= `\! +\chardef\questChar = `\? +\chardef\semiChar = `\; +\chardef\spaceChar = `\ % +\chardef\underChar = `\_ + % Ignore a token. % \def\gobble#1{} @@ -291,7 +303,7 @@ \egroup % \vbox from first cropmarks clause \fi }% end of \shipout\vbox - }% end of group with \turnoffactive + }% end of group with \normalturnoffactive \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi } @@ -470,16 +482,19 @@ \let\{=\mylbrace \let\}=\myrbrace \begingroup - % Definitions to produce actual \{ & \} command in an index. - \catcode`\{ = 12 \catcode`\} = 12 + % Definitions to produce \{ and \} commands for indices, + % and @{ and @} for the aux file. + \catcode`\{ = \other \catcode`\} = \other \catcode`\[ = 1 \catcode`\] = 2 - \catcode`\@ = 0 \catcode`\\ = 12 - @gdef@lbracecmd[\{]% - @gdef@rbracecmd[\}]% -@endgroup + \catcode`\! = 0 \catcode`\\ = \other + !gdef!lbracecmd[\{]% + !gdef!rbracecmd[\}]% + !gdef!lbraceatcmd[@{]% + !gdef!rbraceatcmd[@}]% +!endgroup % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent -% Others are defined by plain TeX: @` @' @" @^ @~ @= @v @H. +% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. \let\, = \c \let\dotaccent = \. \def\ringaccent#1{{\accent23 #1}} @@ -488,7 +503,7 @@ \let\udotaccent = \d % Other special characters: @questiondown @exclamdown -% Plain TeX defines: @AA @AE @O @OE @L (and lowercase versions) @ss. +% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. \def\questiondown{?`} \def\exclamdown{!`} @@ -757,30 +772,36 @@ where each line of input produces a line of output.} % @include file insert text of that file as input. % Allow normal characters that we make active in the argument (a file name). \def\include{\begingroup - \catcode`\\=12 - \catcode`~=12 - \catcode`^=12 - \catcode`_=12 - \catcode`|=12 - \catcode`<=12 - \catcode`>=12 - \catcode`+=12 + \catcode`\\=\other + \catcode`~=\other + \catcode`^=\other + \catcode`_=\other + \catcode`|=\other + \catcode`<=\other + \catcode`>=\other + \catcode`+=\other \parsearg\includezzz} % Restore active chars for included file. \def\includezzz#1{\endgroup\begingroup % Read the included file in a group so nested @include's work. \def\thisfile{#1}% + \let\value=\expandablevalue \input\thisfile \endgroup} \def\thisfile{} -% @center line outputs that line, centered - -\def\center{\parsearg\centerzzz} -\def\centerzzz #1{{\advance\hsize by -\leftskip -\advance\hsize by -\rightskip -\centerline{#1}}} +% @center line +% outputs that line, centered. +% +\def\center{\parsearg\docenter} +\def\docenter#1{{% + \ifhmode \hfil\break \fi + \advance\hsize by -\leftskip + \advance\hsize by -\rightskip + \line{\hfil \ignorespaces#1\unskip \hfil}% + \ifhmode \break \fi +}} % @sp n outputs n lines of vertical space @@ -852,9 +873,9 @@ where each line of input produces a line of output.} % _ within @math be active (mathcode "8000), and distinguish by seeing % if the current family is \slfam, which is what @var uses. % -{\catcode95 = \active % 95 = _ +{\catcode\underChar = \active \gdef\mathunderscore{% - \catcode95=\active + \catcode\underChar=\active \def_{\ifnum\fam=\slfam \_\else\sb\fi}% }} % @@ -1194,9 +1215,10 @@ where each line of input produces a line of output.} \setfont\textrm\rmshape{10}{\mainmagstep} \setfont\texttt\ttshape{10}{\mainmagstep} \fi -% Instead of cmb10, you many want to use cmbx10. +% Instead of cmb10, you may want to use cmbx10. % cmbx10 is a prettier font on its own, but cmb10 -% looks better when embedded in a line with cmr10. +% looks better when embedded in a line with cmr10 +% (in Bob's opinion). \setfont\textbf\bfshape{10}{\mainmagstep} \setfont\textit\itshape{10}{\mainmagstep} \setfont\textsl\slshape{10}{\mainmagstep} @@ -1345,7 +1367,25 @@ where each line of input produces a line of output.} \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy \let\tenttsl=\smallerttsl \resetmathfonts \setleading{9.5pt}} -\let\smallexamplefonts = \smallerfonts + +% Set the fonts to use with the @small... environments. +\let\smallexamplefonts = \smallfonts + +% About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample +% can fit this many characters: +% 8.5x11=86 smallbook=72 a4=90 a5=69 +% If we use \smallerfonts (8pt), then we can fit this many characters: +% 8.5x11=90+ smallbook=80 a4=90+ a5=77 +% For me, subjectively, the few extra characters that fit aren't worth +% the additional smallness of 8pt. So I'm making the default 9pt. +% +% By the way, for comparison, here's what fits with @example (10pt): +% 8.5x11=71 smallbook=60 a4=75 a5=58 +% +% I wish we used A4 paper on this side of the Atlantic. +% +% --karl, 24jan03. + % Set up the default fonts, so we can use them for creating boxes. % @@ -1389,6 +1429,17 @@ where each line of input produces a line of output.} \def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} \def\restorehyphenation{\hyphenchar\font = `- } +% Set sfcode to normal for the chars that usually have another value. +% Can't use plain's \frenchspacing because it uses the `\x notation, and +% sometimes \x has an active definition that messes things up. +% +\catcode`@=11 + \def\frenchspacing{% + \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m + \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m + } +\catcode`@=\other + \def\t#1{% {\tt \rawbackslash \frenchspacing #1}% \null @@ -1488,15 +1539,17 @@ where each line of input produces a line of output.} \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% \else\ifx\arg\wordcode \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% + \else + \errhelp = \EMsimple + \errmessage{Unknown @kbdinputstyle `\arg'}% \fi\fi\fi } \def\worddistinct{distinct} \def\wordexample{example} \def\wordcode{code} -% Default is kbdinputdistinct. (Too much of a hassle to call the macro, -% the catcodes are wrong for parsearg to work.) -\gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl} +% Default is `distinct.' +\kbdinputstyle distinct \def\xkey{\key} \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% @@ -2009,11 +2062,6 @@ where each line of input produces a line of output.} \def\itemcontents{#1}% \let\item=\itemizeitem} -% Set sfcode to normal for the chars that usually have another value. -% These are `.?!:;,' -\def\frenchspacing{\sfcode46=1000 \sfcode63=1000 \sfcode33=1000 - \sfcode58=1000 \sfcode59=1000 \sfcode44=1000 } - % \splitoff TOKENS\endmark defines \first to be the first token in % TOKENS, and \rest to be the remainder. % @@ -2235,8 +2283,8 @@ where each line of input produces a line of output.} \let\go\pickupwholefraction \else \global\advance\colcount by 1 - \setbox0=\hbox{#1\unskip }% Add a normal word space as a separator; - % typically that is always in the input, anyway. + \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a + % separator; typically that is always in the input, anyway. \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% \fi \fi @@ -2251,18 +2299,18 @@ where each line of input produces a line of output.} \go } -% This used to have \hskip1sp. But then the space in a template line is -% not enough. That is bad. So let's go back to just & until we -% encounter the problem it was intended to solve again. -% --karl, nathan@acm.org, 20apr99. -\def\tab{&} - % @multitable ... @end multitable definitions: % \def\multitable{\parsearg\dotable} \def\dotable#1{\bgroup \vskip\parskip - \let\item\crcr + \let\item=\crcrwithfootnotes + % A \tab used to include \hskip1sp. But then the space in a template + % line is not enough. That is bad. So let's go back to just & until + % we encounter the problem it was intended to solve again. --karl, + % nathan@acm.org, 20apr99. + \let\tab=&% + \let\startfootins=\startsavedfootnote \tolerance=9500 \hbadness=9500 \setmultitablespacing @@ -2270,7 +2318,11 @@ where each line of input produces a line of output.} \parindent=\multitableparindent \overfullrule=0pt \global\colcount=0 - \def\Emultitable{\global\setpercentfalse\cr\egroup\egroup}% + \def\Emultitable{% + \global\setpercentfalse + \crcrwithfootnotes\crcr + \egroup\egroup + }% % % To parse everything between @multitable and @item: \setuptable#1 \endsetuptable @@ -2359,6 +2411,25 @@ width0pt\relax} \fi %% than skip between lines in the table. \fi} +% In case a @footnote appears inside an alignment, save the footnote +% text to a box and make the \insert when a row of the table is +% finished. Otherwise, the insertion is lost, it never migrates to the +% main vertical list. --kasal, 22jan03. +% +\newbox\savedfootnotes +% +% \dotable \let's \startfootins to this, so that \dofootnote will call +% it instead of starting the insertion right away. +\def\startsavedfootnote{% + \global\setbox\savedfootnotes = \vbox\bgroup + \unvbox\savedfootnotes +} +\def\crcrwithfootnotes{% + \crcr + \ifvoid\savedfootnotes \else + \noalign{\insert\footins{\box\savedfootnotes}}% + \fi +} \message{conditionals,} % Prevent errors for section commands. @@ -2394,50 +2465,101 @@ width0pt\relax} \fi % and so want to turn off most commands, in case they are used % incorrectly. % +% We use \empty instead of \relax for the @def... commands, so that \end +% doesn't throw an error. For instance: +% @ignore +% @deffn ... +% @end deffn +% @end ignore +% +% The @end deffn is going to get expanded, because we're trying to allow +% nested conditionals. But we don't want to expand the actual @deffn, +% since it might be syntactically correct and intended to be ignored. +% Since \end checks for \relax, using \empty does not cause an error. +% \def\ignoremorecommands{% \let\defcodeindex = \relax - \let\defcv = \relax - \let\deffn = \relax - \let\deffnx = \relax + \let\defcv = \empty + \let\defcvx = \empty + \let\Edefcv = \empty + \let\deffn = \empty + \let\deffnx = \empty + \let\Edeffn = \empty \let\defindex = \relax - \let\defivar = \relax - \let\defmac = \relax - \let\defmethod = \relax - \let\defop = \relax - \let\defopt = \relax - \let\defspec = \relax - \let\deftp = \relax - \let\deftypefn = \relax - \let\deftypefun = \relax - \let\deftypeivar = \relax - \let\deftypeop = \relax - \let\deftypevar = \relax - \let\deftypevr = \relax - \let\defun = \relax - \let\defvar = \relax - \let\defvr = \relax - \let\ref = \relax - \let\xref = \relax - \let\printindex = \relax - \let\pxref = \relax - \let\settitle = \relax - \let\setchapternewpage = \relax - \let\setchapterstyle = \relax - \let\everyheading = \relax + \let\defivar = \empty + \let\defivarx = \empty + \let\Edefivar = \empty + \let\defmac = \empty + \let\defmacx = \empty + \let\Edefmac = \empty + \let\defmethod = \empty + \let\defmethodx = \empty + \let\Edefmethod = \empty + \let\defop = \empty + \let\defopx = \empty + \let\Edefop = \empty + \let\defopt = \empty + \let\defoptx = \empty + \let\Edefopt = \empty + \let\defspec = \empty + \let\defspecx = \empty + \let\Edefspec = \empty + \let\deftp = \empty + \let\deftpx = \empty + \let\Edeftp = \empty + \let\deftypefn = \empty + \let\deftypefnx = \empty + \let\Edeftypefn = \empty + \let\deftypefun = \empty + \let\deftypefunx = \empty + \let\Edeftypefun = \empty + \let\deftypeivar = \empty + \let\deftypeivarx = \empty + \let\Edeftypeivar = \empty + \let\deftypemethod = \empty + \let\deftypemethodx = \empty + \let\Edeftypemethod = \empty + \let\deftypeop = \empty + \let\deftypeopx = \empty + \let\Edeftypeop = \empty + \let\deftypevar = \empty + \let\deftypevarx = \empty + \let\Edeftypevar = \empty + \let\deftypevr = \empty + \let\deftypevrx = \empty + \let\Edeftypevr = \empty + \let\defun = \empty + \let\defunx = \empty + \let\Edefun = \empty + \let\defvar = \empty + \let\defvarx = \empty + \let\Edefvar = \empty + \let\defvr = \empty + \let\defvrx = \empty + \let\Edefvr = \empty + \let\clear = \relax + \let\down = \relax + \let\evenfooting = \relax \let\evenheading = \relax - \let\oddheading = \relax \let\everyfooting = \relax - \let\evenfooting = \relax - \let\oddfooting = \relax + \let\everyheading = \relax \let\headings = \relax \let\include = \relax + \let\item = \relax \let\lowersections = \relax - \let\down = \relax + \let\oddfooting = \relax + \let\oddheading = \relax + \let\printindex = \relax + \let\pxref = \relax \let\raisesections = \relax - \let\up = \relax + \let\ref = \relax \let\set = \relax - \let\clear = \relax - \let\item = \relax + \let\setchapternewpage = \relax + \let\setchapterstyle = \relax + \let\settitle = \relax + \let\up = \relax + \let\verbatiminclude = \relax + \let\xref = \relax } % Ignore @ignore, @ifhtml, @ifinfo, and the like. @@ -2471,7 +2593,7 @@ width0pt\relax} \fi \long\def\doignoretext##1@end #1{\enddoignore}% % % Make sure that spaces turn into tokens that match what \doignoretext wants. - \catcode32 = 10 + \catcode\spaceChar = 10 % % Ignore braces, too, so mismatched braces don't cause trouble. \catcode`\{ = 9 @@ -2513,7 +2635,7 @@ width0pt\relax} \fi \immediate\write16{If you are running another version of TeX, relax.} \immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.} \immediate\write16{ Then upgrade your TeX installation if you can.} - \immediate\write16{ (See ftp://ftp.gnu.org/pub/gnu/TeX.README.)} + \immediate\write16{ (See ftp://ftp.gnu.org/non-gnu/TeX.README.)} \immediate\write16{If you are stuck with version 3.0, run the} \immediate\write16{ script ``tex3patch'' from the Texinfo distribution} \immediate\write16{ to use a workaround.} @@ -2536,7 +2658,7 @@ width0pt\relax} \fi % command, so that nested ignore constructs work. Thus, we put the % text into a \vbox and then do nothing with the result. To minimize % the chance of memory overflow, we follow the approach outlined on - % page 401 of the TeXbook: make the current font be a dummy font. + % page 401 of the TeXbook. % \setbox0 = \vbox\bgroup % Don't complain about control sequences we have declared \outer. @@ -2557,8 +2679,8 @@ width0pt\relax} \fi % % Set the current font to be \nullfont, a TeX primitive, and define % all the font commands to also use \nullfont. We don't use - % dummy.tfm, as suggested in the TeXbook, because not all sites - % might have that installed. Therefore, math mode will still + % dummy.tfm, as suggested in the TeXbook, because some sites + % might not have that installed. Therefore, math mode will still % produce output, but that should be an extremely small amount of % stuff compared to the main input. % @@ -2632,7 +2754,7 @@ width0pt\relax} \fi % we're called from @code, as @code{@value{foo-bar_}}. So \let any % such active characters to their normal equivalents. \gdef\value{\begingroup - \catcode`\-=12 \catcode`\_=12 + \catcode`\-=\other \catcode`\_=\other \indexbreaks \let_\normalunderscore \valuexxx} } @@ -2641,15 +2763,17 @@ width0pt\relax} \fi % We have this subroutine so that we can handle at least some @value's % properly in indexes (we \let\value to this in \indexdummies). Ones % whose names contain - or _ still won't work, but we can't do anything -% about that. The command has to be fully expandable, since the result -% winds up in the index file. This means that if the variable's value -% contains other Texinfo commands, it's almost certain it will fail -% (although perhaps we could fix that with sufficient work to do a -% one-level expansion on the result, instead of complete). +% about that. The command has to be fully expandable (if the variable +% is set), since the result winds up in the index file. This means that +% if the variable's value contains other Texinfo commands, it's almost +% certain it will fail (although perhaps we could fix that with +% sufficient work to do a one-level expansion on the result, instead of +% complete). % \def\expandablevalue#1{% \expandafter\ifx\csname SET#1\endcsname\relax {[No value for ``#1'']}% + \message{Variable `#1', used in @value, is not set.}% \else \csname SET#1\endcsname \fi @@ -2658,13 +2782,14 @@ width0pt\relax} \fi % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined % with @set. % -\def\ifset{\parsearg\ifsetxxx} -\def\ifsetxxx #1{% +\def\ifset{\parsearg\doifset} +\def\doifset#1{% \expandafter\ifx\csname SET#1\endcsname\relax - \expandafter\ifsetfail + \let\next=\ifsetfail \else - \expandafter\ifsetsucceed + \let\next=\ifsetsucceed \fi + \next } \def\ifsetsucceed{\conditionalsucceed{ifset}} \def\ifsetfail{\nestedignore{ifset}} @@ -2673,13 +2798,14 @@ width0pt\relax} \fi % @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been % defined with @set, or has been undefined with @clear. % -\def\ifclear{\parsearg\ifclearxxx} -\def\ifclearxxx #1{% +\def\ifclear{\parsearg\doifclear} +\def\doifclear#1{% \expandafter\ifx\csname SET#1\endcsname\relax - \expandafter\ifclearsucceed + \let\next=\ifclearsucceed \else - \expandafter\ifclearfail + \let\next=\ifclearfail \fi + \next } \def\ifclearsucceed{\conditionalsucceed{ifclear}} \def\ifclearfail{\nestedignore{ifclear}} @@ -2698,28 +2824,13 @@ width0pt\relax} \fi \defineunmatchedend{ifnotinfo} \defineunmatchedend{ifnotplaintext} -% We can't just want to start a group at @iftex (etc.) and end it at -% @end iftex, since then @set commands inside the conditional have no -% effect (they'd get reverted at the end of the group). So we must -% define \Eiftex to redefine itself to be its previous value. (We can't -% just define it to fail again with an ``unmatched end'' error, since -% the @ifset might be nested.) -% -\def\conditionalsucceed#1{% - \edef\temp{% - % Remember the current value of \E#1. - \let\nece{prevE#1} = \nece{E#1}% - % - % At the `@end #1', redefine \E#1 to be its previous value. - \def\nece{E#1}{\let\nece{E#1} = \nece{prevE#1}}% - }% - \temp -} - -% We need to expand lots of \csname's, but we don't want to expand the -% control sequences after we've constructed them. +% True conditional. Since \set globally defines its variables, we can +% just start and end a group (to keep the @end definition undefined at +% the outer level). % -\def\nece#1{\expandafter\noexpand\csname#1\endcsname} +\def\conditionalsucceed#1{\begingroup + \expandafter\def\csname E#1\endcsname{\endgroup}% +} % @defininfoenclose. \let\definfoenclose=\comment @@ -2812,104 +2923,166 @@ width0pt\relax} \fi \def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer} \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} -% Take care of texinfo commands likely to appear in an index entry. -% (Must be a way to avoid doing expansion at all, and thus not have to -% laboriously list every single command here.) +% Take care of Texinfo commands that can appear in an index entry. +% Since there are some commands we want to expand, and others we don't, +% we have to laboriously prevent expansion for those that we don't. % \def\indexdummies{% -\def\ { }% -\def\@{@}% change to @@ when we switch to @ as escape char in aux files. -% Need these in case \tex is in effect and \{ is a \delimiter again. -% But can't use \lbracecmd and \rbracecmd because texindex assumes -% braces and backslashes are used only as delimiters. -\let\{ = \mylbrace -\let\} = \myrbrace -\def\_{{\realbackslash _}}% -\normalturnoffactive -% -% Take care of the plain tex accent commands. -\def\,##1{\realbackslash ,{##1}}% -\def\"{\realbackslash "}% -\def\`{\realbackslash `}% -\def\'{\realbackslash '}% -\def\^{\realbackslash ^}% -\def\~{\realbackslash ~}% -\def\={\realbackslash =}% -\def\b{\realbackslash b}% -\def\c{\realbackslash c}% -\def\d{\realbackslash d}% -\def\u{\realbackslash u}% -\def\v{\realbackslash v}% -\def\H{\realbackslash H}% -\def\dotless##1{\realbackslash dotless {##1}}% -% Take care of the plain tex special European modified letters. -\def\AA{\realbackslash AA}% -\def\AE{\realbackslash AE}% -\def\L{\realbackslash L}% -\def\OE{\realbackslash OE}% -\def\O{\realbackslash O}% -\def\aa{\realbackslash aa}% -\def\ae{\realbackslash ae}% -\def\l{\realbackslash l}% -\def\oe{\realbackslash oe}% -\def\o{\realbackslash o}% -\def\ss{\realbackslash ss}% -% -% Although these internals commands shouldn't show up, sometimes they do. -\def\bf{\realbackslash bf }% -\def\gtr{\realbackslash gtr}% -\def\hat{\realbackslash hat}% -\def\less{\realbackslash less}% -%\def\rm{\realbackslash rm }% -\def\sf{\realbackslash sf}% -\def\sl{\realbackslash sl }% -\def\tclose##1{\realbackslash tclose {##1}}% -\def\tt{\realbackslash tt}% -% -\def\b##1{\realbackslash b {##1}}% -\def\i##1{\realbackslash i {##1}}% -\def\sc##1{\realbackslash sc {##1}}% -\def\t##1{\realbackslash t {##1}}% -\def\r##1{\realbackslash r {##1}}% -% -\def\TeX{\realbackslash TeX}% -\def\acronym##1{\realbackslash acronym {##1}}% -\def\cite##1{\realbackslash cite {##1}}% -\def\code##1{\realbackslash code {##1}}% -\def\command##1{\realbackslash command {##1}}% -\def\dfn##1{\realbackslash dfn {##1}}% -\def\dots{\realbackslash dots }% -\def\emph##1{\realbackslash emph {##1}}% -\def\env##1{\realbackslash env {##1}}% -\def\file##1{\realbackslash file {##1}}% -\def\kbd##1{\realbackslash kbd {##1}}% -\def\key##1{\realbackslash key {##1}}% -\def\math##1{\realbackslash math {##1}}% -\def\option##1{\realbackslash option {##1}}% -\def\samp##1{\realbackslash samp {##1}}% -\def\strong##1{\realbackslash strong {##1}}% -\def\uref##1{\realbackslash uref {##1}}% -\def\url##1{\realbackslash url {##1}}% -\def\var##1{\realbackslash var {##1}}% -\def\w{\realbackslash w }% -% -% These math commands don't seem likely to be used in index entries. -\def\copyright{\realbackslash copyright}% -\def\equiv{\realbackslash equiv}% -\def\error{\realbackslash error}% -\def\expansion{\realbackslash expansion}% -\def\point{\realbackslash point}% -\def\print{\realbackslash print}% -\def\result{\realbackslash result}% -% -% Handle some cases of @value -- where the variable name does not -% contain - or _, and the value does not contain any -% (non-fully-expandable) commands. -\let\value = \expandablevalue -% -\unsepspaces -% Turn off macro expansion -\turnoffmacros + \def\@{@}% change to @@ when we switch to @ as escape char in index files. + \def\ {\realbackslash\space }% + % Need these in case \tex is in effect and \{ is a \delimiter again. + % But can't use \lbracecmd and \rbracecmd because texindex assumes + % braces and backslashes are used only as delimiters. + \let\{ = \mylbrace + \let\} = \myrbrace + % + % \definedummyword defines \#1 as \realbackslash #1\space, thus + % effectively preventing its expansion. This is used only for control + % words, not control letters, because the \space would be incorrect + % for control characters, but is needed to separate the control word + % from whatever follows. + % + % For control letters, we have \definedummyletter, which omits the + % space. + % + % These can be used both for control words that take an argument and + % those that do not. If it is followed by {arg} in the input, then + % that will dutifully get written to the index (or wherever). + % + \def\definedummyword##1{% + \expandafter\def\csname ##1\endcsname{\realbackslash ##1\space}% + }% + \def\definedummyletter##1{% + \expandafter\def\csname ##1\endcsname{\realbackslash ##1}% + }% + % + % Do the redefinitions. + \commondummies +} + +% For the aux file, @ is the escape character. So we want to redefine +% everything using @ instead of \realbackslash. When everything uses +% @, this will be simpler. +% +\def\atdummies{% + \def\@{@@}% + \def\ {@ }% + \let\{ = \lbraceatcmd + \let\} = \rbraceatcmd + % + % (See comments in \indexdummies.) + \def\definedummyword##1{% + \expandafter\def\csname ##1\endcsname{@##1\space}% + }% + \def\definedummyletter##1{% + \expandafter\def\csname ##1\endcsname{@##1}% + }% + % + % Do the redefinitions. + \commondummies +} + +% Called from \indexdummies and \atdummies. \definedummyword and +% \definedummyletter must be defined first. +% +\def\commondummies{% + % + \normalturnoffactive + % + % Control letters and accents. + \definedummyletter{_}% + \definedummyletter{,}% + \definedummyletter{"}% + \definedummyletter{`}% + \definedummyletter{'}% + \definedummyletter{^}% + \definedummyletter{~}% + \definedummyletter{=}% + \definedummyword{u}% + \definedummyword{v}% + \definedummyword{H}% + \definedummyword{dotaccent}% + \definedummyword{ringaccent}% + \definedummyword{tieaccent}% + \definedummyword{ubaraccent}% + \definedummyword{udotaccent}% + \definedummyword{dotless}% + % + % Other non-English letters. + \definedummyword{AA}% + \definedummyword{AE}% + \definedummyword{L}% + \definedummyword{OE}% + \definedummyword{O}% + \definedummyword{aa}% + \definedummyword{ae}% + \definedummyword{l}% + \definedummyword{oe}% + \definedummyword{o}% + \definedummyword{ss}% + % + % Although these internal commands shouldn't show up, sometimes they do. + \definedummyword{bf}% + \definedummyword{gtr}% + \definedummyword{hat}% + \definedummyword{less}% + \definedummyword{sf}% + \definedummyword{sl}% + \definedummyword{tclose}% + \definedummyword{tt}% + % + % Texinfo font commands. + \definedummyword{b}% + \definedummyword{i}% + \definedummyword{r}% + \definedummyword{sc}% + \definedummyword{t}% + % + \definedummyword{TeX}% + \definedummyword{acronym}% + \definedummyword{cite}% + \definedummyword{code}% + \definedummyword{command}% + \definedummyword{dfn}% + \definedummyword{dots}% + \definedummyword{emph}% + \definedummyword{env}% + \definedummyword{file}% + \definedummyword{kbd}% + \definedummyword{key}% + \definedummyword{math}% + \definedummyword{option}% + \definedummyword{samp}% + \definedummyword{strong}% + \definedummyword{uref}% + \definedummyword{url}% + \definedummyword{var}% + \definedummyword{w}% + % + % Assorted special characters. + \definedummyword{bullet}% + \definedummyword{copyright}% + \definedummyword{dots}% + \definedummyword{enddots}% + \definedummyword{equiv}% + \definedummyword{error}% + \definedummyword{expansion}% + \definedummyword{minus}% + \definedummyword{pounds}% + \definedummyword{point}% + \definedummyword{print}% + \definedummyword{result}% + % + % Handle some cases of @value -- where the variable name does not + % contain - or _, and the value does not contain any + % (non-fully-expandable) commands. + \let\value = \expandablevalue + % + % Normal spaces, not active ones. + \unsepspaces + % + % No macro expansion. + \turnoffmacros } % If an index command is used in an @example environment, any spaces @@ -2918,83 +3091,86 @@ width0pt\relax} \fi {\obeyspaces \gdef\unsepspaces{\obeyspaces\let =\space}} -% \indexnofonts no-ops all font-change commands. -% This is used when outputting the strings to sort the index by. -\def\indexdummyfont#1{#1} + +% \indexnofonts is used when outputting the strings to sort the index +% by, and when constructing control sequence names. It eliminates all +% control sequences and just writes whatever the best ASCII sort string +% would be for a given command (usually its argument). +% \def\indexdummytex{TeX} \def\indexdummydots{...} - +% \def\indexnofonts{% -\def\@{@}% -% how to handle braces? -\def\_{\normalunderscore}% -% -\let\,=\indexdummyfont -\let\"=\indexdummyfont -\let\`=\indexdummyfont -\let\'=\indexdummyfont -\let\^=\indexdummyfont -\let\~=\indexdummyfont -\let\==\indexdummyfont -\let\b=\indexdummyfont -\let\c=\indexdummyfont -\let\d=\indexdummyfont -\let\u=\indexdummyfont -\let\v=\indexdummyfont -\let\H=\indexdummyfont -\let\dotless=\indexdummyfont -% Take care of the plain tex special European modified letters. -\def\AA{AA}% -\def\AE{AE}% -\def\L{L}% -\def\OE{OE}% -\def\O{O}% -\def\aa{aa}% -\def\ae{ae}% -\def\l{l}% -\def\oe{oe}% -\def\o{o}% -\def\ss{ss}% -% -% Don't no-op \tt, since it isn't a user-level command -% and is used in the definitions of the active chars like <, >, |, etc. -% Likewise with the other plain tex font commands. -%\let\tt=\indexdummyfont -% -\let\b=\indexdummyfont -\let\i=\indexdummyfont -\let\r=\indexdummyfont -\let\sc=\indexdummyfont -\let\t=\indexdummyfont -% -\let\TeX=\indexdummytex -\let\acronym=\indexdummyfont -\let\cite=\indexdummyfont -\let\code=\indexdummyfont -\let\command=\indexdummyfont -\let\dfn=\indexdummyfont -\let\dots=\indexdummydots -\let\emph=\indexdummyfont -\let\env=\indexdummyfont -\let\file=\indexdummyfont -\let\kbd=\indexdummyfont -\let\key=\indexdummyfont -\let\math=\indexdummyfont -\let\option=\indexdummyfont -\let\samp=\indexdummyfont -\let\strong=\indexdummyfont -\let\uref=\indexdummyfont -\let\url=\indexdummyfont -\let\var=\indexdummyfont -\let\w=\indexdummyfont -} - -% To define \realbackslash, we must make \ not be an escape. -% We must first make another character (@) an escape -% so we do not become unable to do a definition. - -{\catcode`\@=0 \catcode`\\=\other - @gdef@realbackslash{\}} + \def\ { }% + \def\@{@}% + % how to handle braces? + \def\_{\normalunderscore}% + % + \let\,=\asis + \let\"=\asis + \let\`=\asis + \let\'=\asis + \let\^=\asis + \let\~=\asis + \let\==\asis + \let\u=\asis + \let\v=\asis + \let\H=\asis + \let\dotaccent=\asis + \let\ringaccent=\asis + \let\tieaccent=\asis + \let\ubaraccent=\asis + \let\udotaccent=\asis + \let\dotless=\asis + % + % Other non-English letters. + \def\AA{AA}% + \def\AE{AE}% + \def\L{L}% + \def\OE{OE}% + \def\O{O}% + \def\aa{aa}% + \def\ae{ae}% + \def\l{l}% + \def\oe{oe}% + \def\o{o}% + \def\ss{ss}% + \def\exclamdown{!}% + \def\questiondown{?}% + % + % Don't no-op \tt, since it isn't a user-level command + % and is used in the definitions of the active chars like <, >, |, etc. + % Likewise with the other plain tex font commands. + %\let\tt=\asis + % + % Texinfo font commands. + \let\b=\asis + \let\i=\asis + \let\r=\asis + \let\sc=\asis + \let\t=\asis + % + \let\TeX=\indexdummytex + \let\acronym=\asis + \let\cite=\asis + \let\code=\asis + \let\command=\asis + \let\dfn=\asis + \let\dots=\indexdummydots + \let\emph=\asis + \let\env=\asis + \let\file=\asis + \let\kbd=\asis + \let\key=\asis + \let\math=\asis + \let\option=\asis + \let\samp=\asis + \let\strong=\asis + \let\uref=\asis + \let\url=\asis + \let\var=\asis + \let\w=\asis +} \let\indexbackslash=0 %overridden during \printindex. \let\SETmarginindex=\relax % put index entries in margin (undocumented)? @@ -3559,22 +3735,19 @@ width0pt\relax} \fi \outer\def\chapter{\parsearg\chapteryyy} \def\chapteryyy #1{\numhead0{#1}} % normally numhead0 calls chapterzzz \def\chapterzzz #1{% -\secno=0 \subsecno=0 \subsubsecno=0 -\global\advance \chapno by 1 \message{\putwordChapter\space \the\chapno}% -\chapmacro {#1}{\the\chapno}% -\gdef\thissection{#1}% -\gdef\thischaptername{#1}% -% We don't substitute the actual chapter name into \thischapter -% because we don't want its macros evaluated now. -\xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}% -\toks0 = {#1}% -\edef\temp{\noexpand\writetocentry{\realbackslash chapentry{\the\toks0}% - {\the\chapno}}}% -\temp -\donoderef -\global\let\section = \numberedsec -\global\let\subsection = \numberedsubsec -\global\let\subsubsection = \numberedsubsubsec + \secno=0 \subsecno=0 \subsubsecno=0 + \global\advance \chapno by 1 \message{\putwordChapter\space \the\chapno}% + \chapmacro {#1}{\the\chapno}% + \gdef\thissection{#1}% + \gdef\thischaptername{#1}% + % We don't substitute the actual chapter name into \thischapter + % because we don't want its macros evaluated now. + \xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}% + \writetocentry{chap}{#1}{{\the\chapno}} + \donoderef + \global\let\section = \numberedsec + \global\let\subsection = \numberedsubsec + \global\let\subsubsection = \numberedsubsubsec } % we use \chapno to avoid indenting back @@ -3585,21 +3758,18 @@ width0pt\relax} \fi \outer\def\appendix{\parsearg\appendixyyy} \def\appendixyyy #1{\apphead0{#1}} % normally apphead0 calls appendixzzz \def\appendixzzz #1{% -\secno=0 \subsecno=0 \subsubsecno=0 -\global\advance \appendixno by 1 -\message{\putwordAppendix\space \appendixletter}% -\chapmacro {#1}{\appendixbox{\putwordAppendix{} \appendixletter}}% -\gdef\thissection{#1}% -\gdef\thischaptername{#1}% -\xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}% -\toks0 = {#1}% -\edef\temp{\noexpand\writetocentry{\realbackslash appendixentry{\the\toks0}% - {\appendixletter}}}% -\temp -\appendixnoderef -\global\let\section = \appendixsec -\global\let\subsection = \appendixsubsec -\global\let\subsubsection = \appendixsubsubsec + \secno=0 \subsecno=0 \subsubsecno=0 + \global\advance \appendixno by 1 + \message{\putwordAppendix\space \appendixletter}% + \chapmacro {#1}{\appendixbox{\putwordAppendix{} \appendixletter}}% + \gdef\thissection{#1}% + \gdef\thischaptername{#1}% + \xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}% + \writetocentry{appendix}{#1}{{\appendixletter}} + \appendixnoderef + \global\let\section = \appendixsec + \global\let\subsection = \appendixsubsec + \global\let\subsubsection = \appendixsubsubsec } % @centerchap is like @unnumbered, but the heading is centered. @@ -3612,150 +3782,121 @@ width0pt\relax} \fi \outer\def\unnumbered{\parsearg\unnumberedyyy} \def\unnumberedyyy #1{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz \def\unnumberedzzz #1{% -\secno=0 \subsecno=0 \subsubsecno=0 -% -% This used to be simply \message{#1}, but TeX fully expands the -% argument to \message. Therefore, if #1 contained @-commands, TeX -% expanded them. For example, in `@unnumbered The @cite{Book}', TeX -% expanded @cite (which turns out to cause errors because \cite is meant -% to be executed, not expanded). -% -% Anyway, we don't want the fully-expanded definition of @cite to appear -% as a result of the \message, we just want `@cite' itself. We use -% \the to achieve this: TeX expands \the only once, -% simply yielding the contents of . (We also do this for -% the toc entries.) -\toks0 = {#1}\message{(\the\toks0)}% -% -\unnumbchapmacro {#1}% -\gdef\thischapter{#1}\gdef\thissection{#1}% -\toks0 = {#1}% -\edef\temp{\noexpand\writetocentry{\realbackslash unnumbchapentry{\the\toks0}{\the\chapno}}}% -\temp -\unnumbnoderef -\global\let\section = \unnumberedsec -\global\let\subsection = \unnumberedsubsec -\global\let\subsubsection = \unnumberedsubsubsec + \secno=0 \subsecno=0 \subsubsecno=0 + % + % This used to be simply \message{#1}, but TeX fully expands the + % argument to \message. Therefore, if #1 contained @-commands, TeX + % expanded them. For example, in `@unnumbered The @cite{Book}', TeX + % expanded @cite (which turns out to cause errors because \cite is meant + % to be executed, not expanded). + % + % Anyway, we don't want the fully-expanded definition of @cite to appear + % as a result of the \message, we just want `@cite' itself. We use + % \the to achieve this: TeX expands \the only once, + % simply yielding the contents of . (We also do this for + % the toc entries.) + \toks0 = {#1}\message{(\the\toks0)}% + % + \unnumbchapmacro {#1}% + \gdef\thischapter{#1}\gdef\thissection{#1}% + \writetocentry{unnumbchap}{#1}{{\the\chapno}} + \unnumbnoderef + \global\let\section = \unnumberedsec + \global\let\subsection = \unnumberedsubsec + \global\let\subsubsection = \unnumberedsubsubsec } % Sections. \outer\def\numberedsec{\parsearg\secyyy} \def\secyyy #1{\numhead1{#1}} % normally calls seczzz \def\seczzz #1{% -\subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % -\gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}% -\toks0 = {#1}% -\edef\temp{\noexpand\writetocentry{\realbackslash secentry{\the\toks0}% - {\the\chapno}{\the\secno}}}% -\temp -\donoderef -\nobreak + \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % + \gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}% + \writetocentry{sec}{#1}{{\the\chapno}{\the\secno}} + \donoderef + \nobreak } \outer\def\appendixsection{\parsearg\appendixsecyyy} \outer\def\appendixsec{\parsearg\appendixsecyyy} \def\appendixsecyyy #1{\apphead1{#1}} % normally calls appendixsectionzzz \def\appendixsectionzzz #1{% -\subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % -\gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}% -\toks0 = {#1}% -\edef\temp{\noexpand\writetocentry{\realbackslash secentry{\the\toks0}% - {\appendixletter}{\the\secno}}}% -\temp -\appendixnoderef -\nobreak + \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % + \gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}% + \writetocentry{sec}{#1}{{\appendixletter}{\the\secno}} + \appendixnoderef + \nobreak } \outer\def\unnumberedsec{\parsearg\unnumberedsecyyy} \def\unnumberedsecyyy #1{\unnmhead1{#1}} % normally calls unnumberedseczzz \def\unnumberedseczzz #1{% -\plainsecheading {#1}\gdef\thissection{#1}% -\toks0 = {#1}% -\edef\temp{\noexpand\writetocentry{\realbackslash unnumbsecentry% - {\the\toks0}{\the\chapno}{\the\secno}}}% -\temp -\unnumbnoderef -\nobreak + \plainsecheading {#1}\gdef\thissection{#1}% + \writetocentry{unnumbsec}{#1}{{\the\chapno}{\the\secno}} + \unnumbnoderef + \nobreak } % Subsections. \outer\def\numberedsubsec{\parsearg\numberedsubsecyyy} \def\numberedsubsecyyy #1{\numhead2{#1}} % normally calls numberedsubseczzz \def\numberedsubseczzz #1{% -\gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % -\subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}% -\toks0 = {#1}% -\edef\temp{\noexpand\writetocentry{\realbackslash subsecentry{\the\toks0}% - {\the\chapno}{\the\secno}{\the\subsecno}}}% -\temp -\donoderef -\nobreak + \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % + \subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}% + \writetocentry{subsec}{#1}{{\the\chapno}{\the\secno}{\the\subsecno}} + \donoderef + \nobreak } \outer\def\appendixsubsec{\parsearg\appendixsubsecyyy} \def\appendixsubsecyyy #1{\apphead2{#1}} % normally calls appendixsubseczzz \def\appendixsubseczzz #1{% -\gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % -\subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}% -\toks0 = {#1}% -\edef\temp{\noexpand\writetocentry{\realbackslash subsecentry{\the\toks0}% - {\appendixletter}{\the\secno}{\the\subsecno}}}% -\temp -\appendixnoderef -\nobreak + \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % + \subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}% + \writetocentry{subsec}{#1}{{\appendixletter}{\the\secno}{\the\subsecno}} + \appendixnoderef + \nobreak } \outer\def\unnumberedsubsec{\parsearg\unnumberedsubsecyyy} \def\unnumberedsubsecyyy #1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz \def\unnumberedsubseczzz #1{% -\plainsubsecheading {#1}\gdef\thissection{#1}% -\toks0 = {#1}% -\edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsecentry% - {\the\toks0}{\the\chapno}{\the\secno}{\the\subsecno}}}% -\temp -\unnumbnoderef -\nobreak + \plainsubsecheading {#1}\gdef\thissection{#1}% + \writetocentry{unnumbsubsec}{#1}{{\the\chapno}{\the\secno}{\the\subsecno}} + \unnumbnoderef + \nobreak } % Subsubsections. \outer\def\numberedsubsubsec{\parsearg\numberedsubsubsecyyy} \def\numberedsubsubsecyyy #1{\numhead3{#1}} % normally numberedsubsubseczzz \def\numberedsubsubseczzz #1{% -\gdef\thissection{#1}\global\advance \subsubsecno by 1 % -\subsubsecheading {#1} - {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}% -\toks0 = {#1}% -\edef\temp{\noexpand\writetocentry{\realbackslash subsubsecentry{\the\toks0}% - {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}}}% -\temp -\donoderef -\nobreak + \gdef\thissection{#1}\global\advance \subsubsecno by 1 % + \subsubsecheading {#1} + {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}% + \writetocentry{subsubsec}{#1}{{\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}} + \donoderef + \nobreak } \outer\def\appendixsubsubsec{\parsearg\appendixsubsubsecyyy} \def\appendixsubsubsecyyy #1{\apphead3{#1}} % normally appendixsubsubseczzz \def\appendixsubsubseczzz #1{% -\gdef\thissection{#1}\global\advance \subsubsecno by 1 % -\subsubsecheading {#1} - {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}% -\toks0 = {#1}% -\edef\temp{\noexpand\writetocentry{\realbackslash subsubsecentry{\the\toks0}% - {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}}}% -\temp -\appendixnoderef -\nobreak + \gdef\thissection{#1}\global\advance \subsubsecno by 1 % + \subsubsecheading {#1} + {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}% + \writetocentry{subsubsec}{#1}{{\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}} + \appendixnoderef + \nobreak } \outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubsecyyy} \def\unnumberedsubsubsecyyy #1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz \def\unnumberedsubsubseczzz #1{% -\plainsubsubsecheading {#1}\gdef\thissection{#1}% -\toks0 = {#1}% -\edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsubsecentry% - {\the\toks0}{\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}}}% -\temp -\unnumbnoderef -\nobreak + \plainsubsubsecheading {#1}\gdef\thissection{#1}% + \writetocentry{unnumbsubsubsec}{#1}{{\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}} + \unnumbnoderef + \nobreak } % These are variants which are not "outer", so they can appear in @ifinfo. @@ -3796,16 +3937,16 @@ width0pt\relax} \fi \def\majorheading{\parsearg\majorheadingzzz} \def\majorheadingzzz #1{% -{\advance\chapheadingskip by 10pt \chapbreak }% -{\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\raggedright - \rm #1\hfill}}\bigskip \par\penalty 200} + {\advance\chapheadingskip by 10pt \chapbreak }% + {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 + \parindent=0pt\raggedright + \rm #1\hfill}}\bigskip \par\penalty 200} \def\chapheading{\parsearg\chapheadingzzz} \def\chapheadingzzz #1{\chapbreak % -{\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\raggedright - \rm #1\hfill}}\bigskip \par\penalty 200} + {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 + \parindent=0pt\raggedright + \rm #1\hfill}}\bigskip \par\penalty 200} % @heading, @subheading, @subsubheading. \def\heading{\parsearg\plainsecheading} @@ -3972,16 +4113,22 @@ width0pt\relax} \fi % Called from @chapter, etc. We supply {\folio} at the end of the % argument, which will end up as the last argument to the \...entry macro. % -% We open the .toc file here instead of at @setfilename or any other -% fixed time so that @contents can be put in the document anywhere. +% Usage: \writetocentry{chap}{The Name of The Game}{{\the\chapno}} +% We open the .toc file for writing here instead of at @setfilename (or +% any other fixed time) so that @contents can be anywhere in the document. % \newif\iftocfileopened -\def\writetocentry#1{% +\def\writetocentry#1#2#3{% \iftocfileopened\else \immediate\openout\tocfile = \jobname.toc \global\tocfileopenedtrue \fi - \iflinks \write\tocfile{#1{\folio}}\fi + % + \iflinks + \toks0 = {#2}% + \edef\temp{\write\tocfile{\realbackslash #1entry{\the\toks0}#3{\folio}}}% + \temp + \fi % % Tell \shipout to create a page destination if we're doing pdf, which % will be the target of the links in the table of contents. We can't @@ -4233,14 +4380,14 @@ width0pt\relax} \fi \def\tex{\begingroup \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 - \catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie + \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie \catcode `\%=14 - \catcode 43=12 % plus - \catcode`\"=12 - \catcode`\==12 - \catcode`\|=12 - \catcode`\<=12 - \catcode`\>=12 + \catcode `\+=\other + \catcode `\"=\other + \catcode `\==\other + \catcode `\|=\other + \catcode `\<=\other + \catcode `\>=\other \escapechar=`\\ % \let\b=\ptexb @@ -4337,7 +4484,7 @@ width0pt\relax} \fi % \newskip\lskip\newskip\rskip -\long\def\cartouche{% +\def\cartouche{% \begingroup \lskip=\leftskip \rskip=\rightskip \leftskip=0pt\rightskip=0pt %we want these *outside*. @@ -4422,27 +4569,16 @@ width0pt\relax} \fi % @example: Same as @lisp. \def\example{\begingroup \def\Eexample{\nonfillfinish\endgroup}\lisp} -% @small... is usually equivalent to the non-small (@smallbook -% redefines). We must call \example (or whatever) last in the -% definition, since it reads the return following the @example (or -% whatever) command. -% -% This actually allows (for example) @end display inside an -% @smalldisplay. Too bad, but makeinfo will catch the error anyway. -% -\def\smalldisplay{\begingroup\def\Esmalldisplay{\nonfillfinish\endgroup}\display} -\def\smallexample{\begingroup\def\Esmallexample{\nonfillfinish\endgroup}\lisp} -\def\smallformat{\begingroup\def\Esmallformat{\nonfillfinish\endgroup}\format} -\def\smalllisp{\begingroup\def\Esmalllisp{\nonfillfinish\endgroup}\lisp} - -% Real @smallexample and @smalllisp (when @smallbook): use smaller fonts. +% @smallexample and @smalllisp: use smaller fonts. % Originally contributed by Pavel@xerox. -\def\smalllispx{\begingroup +\def\smalllisp{\begingroup \def\Esmalllisp{\nonfillfinish\endgroup}% \def\Esmallexample{\nonfillfinish\endgroup}% \smallexamplefonts \lisp } +\let\smallexample = \smalllisp + % @display: same as @lisp except keep current font. % @@ -4452,9 +4588,9 @@ width0pt\relax} \fi \gobble } % -% @smalldisplay (when @smallbook): @display plus smaller fonts. +% @smalldisplay: @display plus smaller fonts. % -\def\smalldisplayx{\begingroup +\def\smalldisplay{\begingroup \def\Esmalldisplay{\nonfillfinish\endgroup}% \smallexamplefonts \rm \display @@ -4469,9 +4605,9 @@ width0pt\relax} \fi \gobble } % -% @smallformat (when @smallbook): @format plus smaller fonts. +% @smallformat: @format plus smaller fonts. % -\def\smallformatx{\begingroup +\def\smallformat{\begingroup \def\Esmallformat{\nonfillfinish\endgroup}% \smallexamplefonts \rm \format @@ -4668,9 +4804,12 @@ width0pt\relax} \fi % Restore active chars for included file. \endgroup \begingroup - \def\thisfile{#1}% - \expandafter\expandafter\setupverbatiminclude\input\thisfile - \endgroup\nonfillfinish\endgroup + \let\value=\expandablevalue + \def\thisfile{#1}% + \expandafter\expandafter\setupverbatiminclude\input\thisfile + \endgroup + \nonfillfinish + \endgroup } % @copying ... @end copying. @@ -4711,9 +4850,14 @@ width0pt\relax} \fi % then it can also check if \lastpenalty=1. If it does, then manually % do \par. % -% Seems pretty fragile, but for the limited use of getting the copying -% text (which should be quite simple) inserted, we can hope it's ok. -% % +% This messes up the normal definitions of @c[omment], so we redefine +% it. Similarly for @ignore. (These commands are used in the gcc +% manual for man page generation.) +% +% Seems pretty fragile, most line-oriented commands will presumably +% fail, but for the limited use of getting the copying text (which +% should be quite simple) inserted, we can hope it's ok. +% {\catcode`\^^M=\active % \gdef\insertcopying{\begingroup % \parindent = 0pt % looks wrong on title page @@ -4724,6 +4868,15 @@ width0pt\relax} \fi \space \penalty 1 % \fi % }% + % + % Fix @c[omment] for catcode 13 ^^M's. + \def\c##1^^M{\ignorespaces}% + \let\comment = \c % + % + % Don't bother jumping through all the hoops that \doignore does, it + % would be very hard since the catcodes are already set. + \long\def\ignore##1\end ignore{\ignorespaces}% + % \copyingtext % \endgroup}% } @@ -4793,7 +4946,7 @@ width0pt\relax} \fi % Active &'s sneak into the index arguments, so make sure it's defined. { - \catcode`& = 13 + \catcode`& = \active \global\let& = \ampnr } @@ -4878,7 +5031,7 @@ width0pt\relax} \fi \def\defparsebody#1#2#3{% \parsebodycommon{#1}{#2}{#3}% \def#2{\defxbodycommon \activeparens \spacesplit#3}% - \catcode61=\active % 61 is `=' + \catcode\equalChar=\active \begingroup\obeylines\activeparens \spacesplit#3% } @@ -4940,7 +5093,7 @@ width0pt\relax} \fi \def\defvarparsebody #1#2#3{% \parsebodycommon{#1}{#2}{#3}% \def#2{\defxbodycommon \spacesplit#3}% - \catcode61=\active % + \catcode\equalChar=\active \begingroup\obeylines \spacesplit#3% } @@ -5044,7 +5197,7 @@ width0pt\relax} \fi \def\deffnheader #1#2#3{\doind {fn}{\code{#2}}% \begingroup\defname {#2}{#1}\defunargs{#3}\endgroup % -\catcode 61=\other % Turn off change made in \defparsebody +\catcode\equalChar=\other % Turn off change made in \defparsebody } % @defun == @deffn Function @@ -5054,7 +5207,7 @@ width0pt\relax} \fi \def\defunheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index \begingroup\defname {#1}{\putwordDeffunc}% \defunargs {#2}\endgroup % -\catcode 61=\other % Turn off change made in \defparsebody +\catcode\equalChar=\other % Turn off change made in \defparsebody } % @deftypefun int foobar (int @var{foo}, float @var{bar}) @@ -5068,7 +5221,7 @@ width0pt\relax} \fi \doind {fn}{\code{#2}}% Make entry in function index \begingroup\defname {\defheaderxcond#1\relax$.$#2}{\putwordDeftypefun}% \deftypefunargs {#3}\endgroup % -\catcode 61=\other % Turn off change made in \defparsebody +\catcode\equalChar=\other % Turn off change made in \defparsebody } % @deftypefn {Library Function} int foobar (int @var{foo}, float @var{bar}) @@ -5089,7 +5242,7 @@ width0pt\relax} \fi % at least some C++ text from working \defname {\defheaderxcond#2\relax$.$#3}{#1}% \deftypefunargs {#4}\endgroup % -\catcode 61=\other % Turn off change made in \defparsebody +\catcode\equalChar=\other % Turn off change made in \defparsebody } % @defmac == @deffn Macro @@ -5099,7 +5252,7 @@ width0pt\relax} \fi \def\defmacheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index \begingroup\defname {#1}{\putwordDefmac}% \defunargs {#2}\endgroup % -\catcode 61=\other % Turn off change made in \defparsebody +\catcode\equalChar=\other % Turn off change made in \defparsebody } % @defspec == @deffn Special Form @@ -5109,7 +5262,7 @@ width0pt\relax} \fi \def\defspecheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index \begingroup\defname {#1}{\putwordDefspec}% \defunargs {#2}\endgroup % -\catcode 61=\other % Turn off change made in \defparsebody +\catcode\equalChar=\other % Turn off change made in \defparsebody } % @defop CATEGORY CLASS OPERATION ARG... @@ -5307,7 +5460,7 @@ width0pt\relax} \fi \def\scanmacro#1{% \begingroup \newlinechar`\^^M % Undo catcode changes of \startcontents and \doprintindex - \catcode`\@=0 \catcode`\\=12 \escapechar=`\@ + \catcode`\@=0 \catcode`\\=\other \escapechar=`\@ % Append \endinput to make sure that TeX does not see the ending newline. \toks0={#1\endinput}% \immediate\openout\macscribble=\jobname.tmp @@ -5321,7 +5474,7 @@ width0pt\relax} \fi \def\scanmacro#1{% \begingroup \newlinechar`\^^M % Undo catcode changes of \startcontents and \doprintindex -\catcode`\@=0 \catcode`\\=12 \escapechar=`\@ +\catcode`\@=0 \catcode`\\=\other \escapechar=`\@ \let\xeatspaces\eatspaces\scantokens{#1\endinput}\endgroup} \fi @@ -5351,7 +5504,7 @@ width0pt\relax} \fi } % Trim a single trailing ^^M off a string. -{\catcode`\^^M=12\catcode`\Q=3% +{\catcode`\^^M=\other \catcode`\Q=3% \gdef\eatcr #1{\eatcra #1Q^^MQ}% \gdef\eatcra#1^^MQ{\eatcrb#1Q}% \gdef\eatcrb#1Q#2Q{#1}% @@ -5366,29 +5519,29 @@ width0pt\relax} \fi % body, and then making it the \newlinechar in \scanmacro. \def\macrobodyctxt{% - \catcode`\~=12 - \catcode`\^=12 - \catcode`\_=12 - \catcode`\|=12 - \catcode`\<=12 - \catcode`\>=12 - \catcode`\+=12 - \catcode`\{=12 - \catcode`\}=12 - \catcode`\@=12 - \catcode`\^^M=12 + \catcode`\~=\other + \catcode`\^=\other + \catcode`\_=\other + \catcode`\|=\other + \catcode`\<=\other + \catcode`\>=\other + \catcode`\+=\other + \catcode`\{=\other + \catcode`\}=\other + \catcode`\@=\other + \catcode`\^^M=\other \usembodybackslash} \def\macroargctxt{% - \catcode`\~=12 - \catcode`\^=12 - \catcode`\_=12 - \catcode`\|=12 - \catcode`\<=12 - \catcode`\>=12 - \catcode`\+=12 - \catcode`\@=12 - \catcode`\\=12} + \catcode`\~=\other + \catcode`\^=\other + \catcode`\_=\other + \catcode`\|=\other + \catcode`\<=\other + \catcode`\>=\other + \catcode`\+=\other + \catcode`\@=\other + \catcode`\\=\other} % \mbodybackslash is the definition of \ in @macro bodies. % It maps \foo\ => \csname macarg.foo\endcsname => #N @@ -5429,32 +5582,33 @@ width0pt\relax} \fi \else \expandafter\parsemacbody \fi} -\def\unmacro{\parsearg\unmacroxxx} -\def\unmacroxxx#1{% +\def\unmacro{\parsearg\dounmacro} +\def\dounmacro#1{% \if1\csname ismacro.#1\endcsname \global\cslet{#1}{macsave.#1}% \global\expandafter\let \csname ismacro.#1\endcsname=0% - % Remove the macro name from \macrolist + % Remove the macro name from \macrolist: \begingroup - \edef\tempa{\expandafter\noexpand\csname#1\endcsname}% - \def\do##1{% - \def\tempb{##1}% - \ifx\tempa\tempb - % remove this - \else - \toks0 = \expandafter{\newmacrolist\do}% - \edef\newmacrolist{\the\toks0\expandafter\noexpand\tempa}% - \fi}% - \def\newmacrolist{}% - % Execute macro list to define \newmacrolist - \macrolist - \global\let\macrolist\newmacrolist + \expandafter\let\csname#1\endcsname \relax + \let\do\unmacrodo + \xdef\macrolist{\macrolist}% \endgroup \else \errmessage{Macro #1 not defined}% \fi } +% Called by \do from \dounmacro on each macro. The idea is to omit any +% macro definitions that have been changed to \relax. +% +\def\unmacrodo#1{% + \ifx#1\relax + % remove this + \else + \noexpand\do \noexpand #1% + \fi +} + % This makes use of the obscure feature that if the last token of a % is #, then the preceding argument is delimited by % an opening brace, and that opening brace is not consumed. @@ -5637,15 +5791,23 @@ width0pt\relax} \fi \gdef\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} \gdef\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} -% \setref{NAME}{SNT} defines a cross-reference point NAME, namely -% NAME-title, NAME-pg, and NAME-SNT. Called from \foonoderef. We have -% to set \indexdummies so commands such as @code in a section title -% aren't expanded. It would be nicer not to expand the titles in the -% first place, but there's so many layers that that is hard to do. +% \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an +% anchor), namely NAME-title (the corresponding @chapter/etc. name), +% NAME-pg (the page number), and NAME-snt (section number and type). +% Called from \foonoderef. +% +% We have to set \indexdummies so commands such as @code in a section +% title aren't expanded. It would be nicer not to expand the titles in +% the first place, but there's so many layers that that is hard to do. % +% Likewise, use \turnoffactive so that punctuation chars such as underscore +% and backslash work in node names. +% \def\setref#1#2{{% - \indexdummies + \atdummies \pdfmkdest{#1}% + % + \turnoffactive \dosetq{#1-title}{Ytitle}% \dosetq{#1-pg}{Ypagenumber}% \dosetq{#1-snt}{#2}% @@ -5697,7 +5859,7 @@ width0pt\relax} \fi \ifpdf \leavevmode \getfilename{#4}% - {\normalturnoffactive + {\turnoffactive \otherbackslash \ifnum\filenamelength>0 \startlink attr{/Border [0 0 0]}% goto file{\the\filename.pdf} name{#1}% @@ -5717,7 +5879,7 @@ width0pt\relax} \fi % into the usual \leavevmode...\vrule stuff for purposes of % printing. So we \turnoffactive for the \refx-snt, back on for the % printing, back off for the \refx-pg. - {\normalturnoffactive + {\turnoffactive \otherbackslash % Only output a following space if the -snt ref is nonempty; for % @unnumbered and @anchor, it won't be. \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% @@ -5726,73 +5888,74 @@ width0pt\relax} \fi % [mynode], [\printednodename],\space % page 3 - \turnoffactive \putwordpage\tie\refx{#1-pg}{}% + \turnoffactive \otherbackslash \putwordpage\tie\refx{#1-pg}{}% \fi \endlink \endgroup} -% \dosetq is the interface for calls from other macros - -% Use \normalturnoffactive so that punctuation chars such as underscore -% and backslash work in node names. (\turnoffactive doesn't do \.) +% \dosetq is called from \setref to do the actual \write (\iflinks). +% \def\dosetq#1#2{% {\let\folio=0% - \normalturnoffactive \edef\next{\write\auxfile{\internalsetq{#1}{#2}}}% - \iflinks - \next - \fi + \iflinks \next \fi }% } -% \internalsetq {foo}{page} expands into -% CHARACTERS 'xrdef {foo}{...expansion of \Ypage...} -% When the aux file is read, ' is the escape character - -\def\internalsetq #1#2{'xrdef {#1}{\csname #2\endcsname}} - -% Things to be expanded by \internalsetq +% \internalsetq{foo}{page} expands into +% CHARACTERS @xrdef{foo}{...expansion of \page...} +\def\internalsetq#1#2{@xrdef{#1}{\csname #2\endcsname}} +% Things to be expanded by \internalsetq. +% \def\Ypagenumber{\folio} - \def\Ytitle{\thissection} - \def\Ynothing{} - \def\Ysectionnumberandtype{% -\ifnum\secno=0 \putwordChapter\xreftie\the\chapno % -\else \ifnum \subsecno=0 \putwordSection\xreftie\the\chapno.\the\secno % -\else \ifnum \subsubsecno=0 % -\putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno % -\else % -\putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno % -\fi \fi \fi } + \ifnum\secno=0 + \putwordChapter@tie \the\chapno + \else \ifnum\subsecno=0 + \putwordSection@tie \the\chapno.\the\secno + \else \ifnum\subsubsecno=0 + \putwordSection@tie \the\chapno.\the\secno.\the\subsecno + \else + \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno + \fi\fi\fi +} \def\Yappendixletterandtype{% -\ifnum\secno=0 \putwordAppendix\xreftie'char\the\appendixno{}% -\else \ifnum \subsecno=0 \putwordSection\xreftie'char\the\appendixno.\the\secno % -\else \ifnum \subsubsecno=0 % -\putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno % -\else % -\putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno % -\fi \fi \fi } - -\gdef\xreftie{'tie} + \ifnum\secno=0 + \putwordAppendix@tie @char\the\appendixno{}% + \else \ifnum\subsecno=0 + \putwordSection@tie @char\the\appendixno.\the\secno + \else \ifnum\subsubsecno=0 + \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno + \else + \putwordSection@tie + @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno + \fi\fi\fi +} % Use TeX 3.0's \inputlineno to get the line number, for better error % messages, but if we're using an old version of TeX, don't do anything. % \ifx\inputlineno\thisisundefined - \let\linenumber = \empty % Non-3.0. + \let\linenumber = \empty % Pre-3.0. \else \def\linenumber{\the\inputlineno:\space} \fi % Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. % If its value is nonempty, SUFFIX is output afterward. - +% \def\refx#1#2{% - \expandafter\ifx\csname X#1\endcsname\relax + {% + \indexnofonts + \otherbackslash + \expandafter\global\expandafter\let\expandafter\thisrefX + \csname X#1\endcsname + }% + \ifx\thisrefX\relax % If not defined, say something at least. \angleleft un\-de\-fined\angleright \iflinks @@ -5807,19 +5970,14 @@ width0pt\relax} \fi \fi \else % It's defined, so just use it. - \csname X#1\endcsname + \thisrefX \fi #2% Output the suffix in any case. } % This is the macro invoked by entries in the aux file. % -\def\xrdef#1{\begingroup - % Reenable \ as an escape while reading the second argument. - \catcode`\\ = 0 - \afterassignment\endgroup - \expandafter\gdef\csname X#1\endcsname -} +\def\xrdef#1{\expandafter\gdef\csname X#1\endcsname} % Read the last existing aux file, if any. No error if none exists. \def\readauxfile{\begingroup @@ -5850,9 +6008,7 @@ width0pt\relax} \fi \catcode`\^^]=\other \catcode`\^^^=\other \catcode`\^^_=\other - \catcode`\@=\other - \catcode`\^=\other - % It was suggested to define this as 7, which would allow ^^e4 etc. + % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc. % in xref tags, i.e., node names. But since ^^e4 notation isn't % supported in the main text, it doesn't seem desirable. Furthermore, % that is not enough: for node names that actually contain a ^ @@ -5865,6 +6021,9 @@ width0pt\relax} \fi % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter % and then to call \auxhat in \setq. % + \catcode`\^=\other + % + % Special characters. Should be turned off anyway, but... \catcode`\~=\other \catcode`\[=\other \catcode`\]=\other @@ -5876,7 +6035,9 @@ width0pt\relax} \fi \catcode`\$=\other \catcode`\#=\other \catcode`\&=\other + \catcode`\%=\other \catcode`+=\other % avoid \+ for paranoia even though we've turned it off + % % Make the characters 128-255 be printing characters {% \count 1=128 @@ -5886,17 +6047,18 @@ width0pt\relax} \fi \ifnum \count 1<256 \loop \fi }% }% - % The aux file uses ' as the escape (for now). + % % Turn off \ as an escape so we do not lose on % entries which were dumped with control sequences in their names. - % For example, 'xrdef {$\leq $-fun}{page ...} made by @defun ^^ + % For example, @xrdef{$\leq $-fun}{page ...} made by @defun ^^ % Reference to such entries still does not work the way one would wish, % but at least they do not bomb out when the aux file is read in. + \catcode`\\=\other + % + % @ is our escape character in .aux files. \catcode`\{=1 \catcode`\}=2 - \catcode`\%=\other - \catcode`\'=0 - \catcode`\\=\other + \catcode`\@=0 % \openin 1 \jobname.aux \ifeof 1 \else @@ -5941,7 +6103,7 @@ width0pt\relax} \fi % Remove inadvertent blank space before typesetting the footnote number. \unskip \thisfootno\@sf - \footnotezzz + \dofootnote }% % Don't bother with the trickery in plain.tex to not require the @@ -5951,10 +6113,17 @@ width0pt\relax} \fi % \parseargline fail inside footnotes because the tokens are fixed when % the footnote is read. --karl, 16nov96. % -\long\gdef\footnotezzz{\insert\footins\bgroup +% The start of the footnote looks usually like this: +\gdef\startfootins{\insert\footins\bgroup} +% +% ... but this macro is redefined inside @multitable. +% +\gdef\dofootnote{% + \startfootins % We want to typeset this text as a normal paragraph, even if the % footnote reference occurs in (for example) a display environment. % So reset some parameters. + \hsize=\pagewidth \interlinepenalty\interfootnotelinepenalty \splittopskip\ht\strutbox % top baseline for broken footnotes \splitmaxdepth\dp\strutbox @@ -5984,12 +6153,6 @@ width0pt\relax} \fi \footstrut \futurelet\next\fo@t } -\def\fo@t{\ifcat\bgroup\noexpand\next \let\next\f@@t - \else\let\next\f@t\fi \next} -\def\f@@t{\bgroup\aftergroup\@foot\let\next} -\def\f@t#1{#1\@foot} -\def\@foot{\strut\par\egroup} - }%end \catcode `\@=11 % @| inserts a changebar to the left of the current line. It should @@ -6036,8 +6199,8 @@ width0pt\relax} \fi \openin 1 = epsf.tex \ifeof 1 \else \closein 1 - % Do not bother showing banner with post-v2.7 epsf.tex (available in - % doc/epsf.tex until it shows up on ctan). + % Do not bother showing banner with epsf.tex v2.7k (available in + % doc/epsf.tex and on ctan). \def\epsfannounce{\toks0 = }% \input epsf.tex \fi @@ -6198,15 +6361,6 @@ should work if nowhere else does.} \setemergencystretch } -% Use `small' versions. -% -\def\smallenvironments{% - \let\smalldisplay = \smalldisplayx - \let\smallexample = \smalllispx - \let\smallformat = \smallformatx - \let\smalllisp = \smalllispx -} - % @letterpaper (the default). \def\letterpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt @@ -6234,7 +6388,6 @@ should work if nowhere else does.} \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = .5cm - \smallenvironments }} % Use @afourpaper to print on European A4 paper. @@ -6281,8 +6434,6 @@ should work if nowhere else does.} \contentsrightmargin = 0pt \defbodyindent = 2mm \tableindent = 12mm - % - \smallenvironments }} % A specific text layout, 24x15cm overall, intended for A4 paper. @@ -6393,7 +6544,7 @@ should work if nowhere else does.} \catcode`\_=\active \def_{\ifusingtt\normalunderscore\_} % Subroutine for the previous macro. -\def\_{\leavevmode \kern.06em \vbox{\hrule width.3em height.1ex}} +\def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } \catcode`\|=\active \def|{{\tt\char124}} @@ -6407,8 +6558,6 @@ should work if nowhere else does.} \def+{{\tt \char 43}} \catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix -%\catcode 27=\active -%\def^^[{$\diamondsuit$} % Set up an active definition for =, but don't enable it most of the time. {\catcode`\==\active @@ -6425,35 +6574,45 @@ should work if nowhere else does.} \catcode`\@=0 -% \rawbackslashxx output one backslash character in current font +% \rawbackslashxx outputs one backslash character in current font, +% as in \char`\\. \global\chardef\rawbackslashxx=`\\ -%{\catcode`\\=\other -%@gdef@rawbackslashxx{\}} -% \rawbackslash redefines \ as input to do \rawbackslashxx. +% \rawbackslash defines an active \ to do \rawbackslashxx. +% \otherbackslash defines an active \ to be a literal `\' character with +% catcode other. {\catcode`\\=\active -@gdef@rawbackslash{@let\=@rawbackslashxx }} + @gdef@rawbackslash{@let\=@rawbackslashxx} + @gdef@otherbackslash{@let\=@realbackslash} +} + +% \realbackslash is an actual character `\' with catcode other. +{\catcode`\\=\other @gdef@realbackslash{\}} % \normalbackslash outputs one backslash in fixed width font. \def\normalbackslash{{\tt\rawbackslashxx}} -% \catcode 17=0 % Define control-q \catcode`\\=\active % Used sometimes to turn off (effectively) the active characters % even after parsing them. -@def@turnoffactive{@let"=@normaldoublequote -@let\=@realbackslash -@let~=@normaltilde -@let^=@normalcaret -@let_=@normalunderscore -@let|=@normalverticalbar -@let<=@normalless -@let>=@normalgreater -@let+=@normalplus -@let$=@normaldollar}%$ font-lock fix - -% Same as @turnoffactive except for \. +@def@turnoffactive{% + @let"=@normaldoublequote + @let\=@realbackslash + @let~=@normaltilde + @let^=@normalcaret + @let_=@normalunderscore + @let|=@normalverticalbar + @let<=@normalless + @let>=@normalgreater + @let+=@normalplus + @let$=@normaldollar %$ font-lock fix +} + +% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of +% the literal character `\'. (Thus, \ is not expandable when this is in +% effect.) +% @def@normalturnoffactive{@turnoffactive @let\=@normalbackslash} % Make _ and + \other characters, temporarily. diff --git a/doc/version.tex b/doc/version.tex index 9a58611..e4f17d3 100644 --- a/doc/version.tex +++ b/doc/version.tex @@ -1 +1 @@ -\def\versionnumber{2.11.0} +\def\versionnumber{2.11.1} diff --git a/doc/version.texi b/doc/version.texi index 9aa1963..092d744 100644 --- a/doc/version.texi +++ b/doc/version.texi @@ -1 +1 @@ -@set VERSION 2.11.0 +@set VERSION 2.11.1 diff --git a/doc/wl-ja.texi b/doc/wl-ja.texi index 27b034b..a6f0e7a 100644 --- a/doc/wl-ja.texi +++ b/doc/wl-ja.texi @@ -278,7 +278,7 @@ APEL, FLIM, SEMI $B$N=g$K%$%s%9%H!<%k$7$F$/$@$5$$!#(B $B?d>)$5$l$k(B APEL, FLIM, SEMI $B$N%P!<%8%g%s$NAH9g$;$O!"0J2<$NDL$j$G$9!#(B @itemize @minus -@item APEL 10.4, FLIM 1.14.4, SEMI 1.14.5 +@item APEL 10.4, FLIM 1.14.5, SEMI 1.14.5 @end itemize $B$=$NB>!"(BFLIM, SEMI $B$K$O$$$m$$$m$JJQ7A%P!<%8%g%s$,B8:_$7$^$9$,!"(B @@ -3285,10 +3285,13 @@ first, last ...$B%U%#%k%?%U%)%k%@$K0\F0(B @item T @kindex T (Summary) @findex wl-summary-toggle-thread -$B%9%l%C%II=<($r%H%0%k$7$^$9!#(B -$B8=:_$N%9%l%C%II=<(>uBV$O%b!<%I%i%$%s$KI=<($5$l$^$9!%(B -@samp{@{S@}} $B$O%9%l%C%I!&%*%U(B(Sequence)$B$N>uBV!$(B -@samp{@{T@}} $B$O%9%l%C%I!&%*%s(B(Thread)$B$N>uBV$r<($7$^$9!%(B +$B%9%l%C%II=<($r%H%0%k$7$^$9!#$=$N>uBV$O(B Wanderlust $B$r=*N;$7$F$bJ]B8$5$l(B +$B$^$9!#?75,$K:n@.$5$l$?%5%^%j$KBP$7$F$N%G%U%)%k%H$N>uBV$O(B +@code{wl-summary-default-view} $B$d(B @code{wl-summary-default-view-alist} +$B$G;XDj$9$k$3$H$,$G$-$^$9!#(B +$B8=:_$N%9%l%C%II=<(>uBV$O%b!<%I%i%$%s$KI=<($5$l$^$9!#(B +@samp{@{S@}} $B$O%9%l%C%I!&%*%U(B(Sequence)$B$N>uBV!"(B +@samp{@{T@}} $B$O%9%l%C%I!&%*%s(B(Thread)$B$N>uBV$r<($7$^$9!#(B (@code{wl-summary-toggle-thread}) @item l @@ -3756,7 +3759,7 @@ nil$B!'(B $B%U%)%k%@%b!<%I$KLa$k$+?R$M$k(B @item wl-summary-weekday-name-lang @vindex wl-summary-weekday-name-lang -$B=i4|@_Dj$O(B @samp{ja}$B!#%5%^%j$NMKF|I=<($N8@8l$r;XDj$7$^$9!#(B@samp{en} $B$J$i(B +$B%5%^%j$NMKF|I=<($N8@8l$r;XDj$7$^$9!#(B@samp{en} $B$J$i(B $B1Q8l!"(B@samp{fr} $B$J$i%U%i%s%98l!"(B@samp{de} $B$J$i%I%$%D8l$H$J$j$^$9!#(B $BCM$rJQ99$7$?8e$K$O!"%5%^%j$r(B rescan $B$7$F2<$5$$!#(B @@ -3780,18 +3783,41 @@ Non-nil $B$J$i!"(B@samp{^L} $B$G2~%Z!<%8$7$F%a%C%;!<%8$rI=<($7$^$9!#(B @item wl-message-window-size @vindex wl-message-window-size $B=i4|@_Dj$O(B '(1 . 4)$B!#(B -$B%5%^%j$rI=<($9$k%&%#%s%I%&$H%a%C%;!<%8K\BN$rI=<($9$k%&%#%s%I%&$NHf$r(B cons $B$G;XDj$7$^$9!#(Bcar:cdr $B$,(B $B%5%^%j(B:$B%a%C%;!<%8(B $B$G$9!#(B +$B%5%^%j$rI=<($9$k%&%#%s%I%&$H%a%C%;!<%8K\BN$rI=<($9$k%&%#%s%I%&$NHf$r(B +cons $B$G;XDj$7$^$9!#(Bcar:cdr $B$,(B $B%5%^%j(B:$B%a%C%;!<%8(B $B$G$9!#(B + +@item wl-summary-from-function +@vindex wl-summary-from-function +$B%5%^%j$N:9=P?MI=<($N@07A$K;H$&4X?t$r;XDj$7$^$9!#(B +$B=i4|@_Dj$O(B @code{wl-summary-default-from} $B$G$9!#(B @item wl-summary-no-from-message @vindex wl-summary-no-from-message $B=i4|@_Dj$O(B @samp{nobody@@nowhere?}$B!#(B $B%a%C%;!<%8$K(B @samp{From:} $B$,L5$+$C$?>l9g$K%5%^%j$KI=<($9$kJ8;zNs$G$9!#(B +@item wl-summary-subject-function +@vindex wl-summary-subject-function +$B%5%^%j$N%5%V%8%'%/%HI=<($N@07A$K;H$&4X?t$r;XDj$7$^$9!#(B +$B=i4|@_Dj$O(B @code{wl-summary-default-subject} $B$G!"%5%V%8%'%/%H@hF,$N(B +$B%j%9%HL>$J$IItJ,$r%+%C%H$7$^$9!#(B +$B%5%V%8%'%/%H$r$=$N$^$^I=<($9$k$K$O0J2<$N$h$&$K@_Dj$7$^$9!#(B + +@lisp +(setq wl-summary-subject-function 'identity) +@end lisp + @item wl-summary-no-subject-message @vindex wl-summary-no-subject-message $B=i4|@_Dj$O(B @samp{(WL:No Subject in original.)}$B!#%a%C%;!<%8$K(B @samp{Subject:} $B$,L5$+$C$?>l9g$K%5%^%j$KI=<($9$kJ8;zNs$G$9!#(B +@item wl-summary-default-view +@vindex wl-summary-default-view +$B=i4|@_Dj$O(B @code{'thread}$B!#(B +$B?75,$K:n@.$5$l$?%5%^%j$N>uBV$r%9%l%C%II=<($J$i(B @code{'thread}$B!"(B +$BHV9f=g$J$i(B @code{'sequence} $B$N$$$:$l$+$G;XDj$7$^$9!#(B + @item wl-summary-use-frame @vindex wl-summary-use-frame $B=i4|@_Dj$O(B @code{nil}$B!#(B @@ -3844,6 +3870,10 @@ petname $B$G$bJd40$,$G$-$^$9!#(B $BCM$r(B @code{nil} $B$K$9$k$H$-$O!"(B@code{wl-summary-width} $B$b(B @code{nil} $B$K@_Dj(B $B$9$k$H$h$$$G$7$g$&!#(B +@item wl-summary-max-thread-depth +@vindex wl-summary-max-thread-depth +$B=i4|@_Dj$O(B 30$B!#@_Dj$5$l$?CM0J>e$N?<$5$N%9%l%C%I$rJ,3d$7$^$9!#(B + @item wl-summary-recenter @vindex wl-summary-recenter $B=i4|@_Dj$O(B @code{t}$B!#(BNon-nil $B$J$i$PI=<($7$?$H$-$KI=<(Cf$N%a%C%;!<%8$N%5(B diff --git a/doc/wl.texi b/doc/wl.texi index 96dd5b2..5747659 100644 --- a/doc/wl.texi +++ b/doc/wl.texi @@ -254,7 +254,7 @@ may help you.}. Recommended combination of APEL, FLIM and SEMI are following: @itemize @minus -@item APEL 10.4, FLIM 1.14.4 and SEMI 1.14.5 +@item APEL 10.4, FLIM 1.14.5 and SEMI 1.14.5 @end itemize You can also use many other FLIM/SEMI variants. Combination of the @@ -3296,7 +3296,9 @@ You can sort by @samp{date}, @samp{from}, @samp{number} and @samp{subject}. @item T @kindex T (Summary) @findex wl-summary-toggle-thread -Toggle the threading. +Toggle the threading. The state will be preserved after exiting +Wanderlust. You can alter default state for newly created summary +by @code{wl-summary-default-view} or @code{wl-summary-default-view-alist}. Threading status is displayed on the modeline. @samp{@{S@}} means threading is off (Sequence) and @samp{@{T@}} means threading is on (Thread). @@ -3770,7 +3772,7 @@ folder is moved. @item wl-summary-weekday-name-lang @vindex wl-summary-weekday-name-lang -The initial setting is @samp{ja}. Specify language of the weekday. +Specify language of the weekday. @samp{en} displays English, @samp{fr} displays French, @samp{de} displays Deutsch. You should rescan summary view after changing this value. @@ -3797,16 +3799,38 @@ The initial setting is '(1 . 4). A cons cell to specify the rate of summary and message window. car:cdr corresponds summary:message. +@item wl-summary-from-function +@vindex wl-summary-from-function +Format function to display sender in summary. +The initial setting is @code{wl-summary-default-from}. + @item wl-summary-no-from-message @vindex wl-summary-no-from-message The initial setting is @samp{nobody@@nowhere?}. A string which is displayed when there's no @samp{From:} field in the message. +@item wl-summary-subject-function +@vindex wl-summary-subject-function +Format function to display subject in summary. +The initial setting is @code{wl-summary-default-subject} and +it will cut the list name part etc. on the top of the subject. +To display subject as it is, set as follows. + +@lisp +(setq wl-summary-subject-function 'identity) +@end lisp + @item wl-summary-no-subject-message @vindex wl-summary-no-subject-message The initial setting is @samp{(WL:No Subject in original.)}. A string which is displayed when there's no @samp{Subject:} field in the message. +@item wl-summary-default-view +@vindex wl-summary-default-view +The initial setting is @code{'thread}. +The default state for newly created summary. You can set either +@code{'thread} for thread view or @code{'sequence} for sequential view. + @item wl-summary-use-frame @vindex wl-summary-use-frame The initial setting is @code{nil}. @@ -3861,6 +3885,12 @@ indent level. If you set this to @code{nil} you should set @code{wl-summary-width} to @code{nil}, too. +@item wl-summary-max-thread-depth +@vindex wl-summary-max-thread-depth +The initial setting is 15. +If thread depth of the message is larger than this value, +the thread is divided. + @item wl-summary-recenter @vindex wl-summary-recenter The initial setting is t. diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 14fa636..0bd723a 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,58 @@ +2003-01-29 Yoichi NAKAYAMA + + * elmo-util.el (elmo-object-save): Bind print-level, print-length. + (elmo-passwd-alist-save): Ditto. + * elmo-database.el (elmo-database-msgid-put): Bind print-length. + +2003-01-17 Yoichi NAKAYAMA + + * elmo-localdir.el (elmo-folder-expand-msgdb-path): Expand + dir-name only if it is absolute path. + (TODO: distinguish +/something and +something) + +2003-01-15 Yoichi NAKAYAMA + + * elmo-localdir.el (elmo-folder-expand-msgdb-path): Correct msgdb + path for "+~/something". + +2003-01-15 Yoichi NAKAYAMA + + * elmo-localdir.el (elmo-folder-rename-internal): If new-dir exist + as non-directory, cause error before rename-file. + * elmo-archive.el (elmo-folder-rename-internal): Create directory + apropriately, mimic localdir's one. + Based on the patch from KAMO Tomoyuki . + +2003-01-10 Tsutomu OKADA + + * elmo-map.el (elmo-folder-pack-numbers): Fix name of the function. + +2003-01-06 Yuuichi Teranishi + + * elmo-msgdb.el: Moved global mark handling stuffs to elmo-util.el. + + * elmo-util.el: Moved global mark handling stuffs from elmo-msgdb.el. + + * elmo-util.el (elmo-file-cache-delete): Check whether the cache file + is included in the global-mark or not. + +2002-12-23 Yoichi NAKAYAMA + + * utf7.el (toplevel): Avoid error when the function + find-coding-system does not exist. + +2002-12-20 Yoichi NAKAYAMA + + * elmo-nntp.el (elmo-folder-search): Body search is to search from + cache even if the folder is plugged. + (elmo-nntp-search-primitive): Do nothing when body search is + invoked (although it is not used by the change above). + * elmo-multi.el (elmo-folder-search): Don't ignore error anymore. + +2002-12-20 Kenichi OKADA + + * elmo-version.el (elmo-version): Up to 2.11.1. + 2002-12-10 Kenichi OKADA * elmo-archive.el: Specify charset. diff --git a/elmo/elmo-archive.el b/elmo/elmo-archive.el index 06fb518..6aa1969 100644 --- a/elmo/elmo-archive.el +++ b/elmo/elmo-archive.el @@ -309,7 +309,7 @@ TYPE specifies the archiver's symbol." (not (eobp))) ; for GNU tar 981010 (setq file-list (nconc file-list (list (string-to-int (match-string 1))))))) - (error "%s does not exist." file)) + (error "%s does not exist" file)) (if nonsort (cons (or (elmo-max-of-list file-list) 0) (if killed @@ -457,7 +457,11 @@ TYPE specifies the archiver's symbol." (luna-define-method elmo-folder-rename-internal ((folder elmo-archive-folder) new-folder) (let* ((old-arc (elmo-archive-get-archive-name folder)) - (new-arc (elmo-archive-get-archive-name new-folder))) + (new-arc (elmo-archive-get-archive-name new-folder)) + (new-dir (directory-file-name + (elmo-archive-get-archive-directory new-folder)))) + (if elmo-archive-treat-file + (setq new-dir (directory-file-name (file-name-directory new-dir)))) (unless (and (eq (elmo-archive-folder-archive-type-internal folder) (elmo-archive-folder-archive-type-internal new-folder)) (equal (elmo-archive-folder-archive-prefix-internal @@ -469,6 +473,8 @@ TYPE specifies the archiver's symbol." (error "No such file: %s" old-arc) (if (file-exists-p new-arc) (error "Already exists: %s" new-arc) + (if (not (file-directory-p new-dir)) + (elmo-make-directory new-dir)) (rename-file old-arc new-arc) t)))) @@ -522,7 +528,7 @@ TYPE specifies the archiver's symbol." (elmo-mapcar-list-of-list (function (lambda (x) (if (file-exists-p - (expand-file-name + (expand-file-name (concat elmo-archive-basename (elmo-archive-get-suffix (elmo-archive-folder-archive-type-internal diff --git a/elmo/elmo-database.el b/elmo/elmo-database.el index 55bf2de..22a3912 100644 --- a/elmo/elmo-database.el +++ b/elmo/elmo-database.el @@ -50,7 +50,8 @@ (defun elmo-database-msgid-put (msgid folder number) (let ((db (elmo-database-get 'elmo-database-msgid - elmo-database-msgid-filename))) + elmo-database-msgid-filename)) + print-length) (and msgid db (progn (remove-database msgid db) diff --git a/elmo/elmo-dop.el b/elmo/elmo-dop.el index b29cc4a..3726736 100644 --- a/elmo/elmo-dop.el +++ b/elmo/elmo-dop.el @@ -92,12 +92,12 @@ Automatically loaded/saved.") (unless (or (null elmo-dop-queue) (vectorp (car elmo-dop-queue))) (if (y-or-n-p "\ -Saved queue is old version(2.6). Clear all pending operations? ") +Saved queue is old version(2.6). Clear all pending operations? ") (progn (setq elmo-dop-queue nil) (message "All pending operations are cleared.") (elmo-dop-queue-save)) - (error "Please use 2.6 or earlier."))) + (error "Please use 2.6 or earlier"))) (elmo-dop-queue-merge) (let ((queue-all elmo-dop-queue) queue @@ -135,7 +135,7 @@ Saved queue is old version(2.6). Clear all pending operations? ") (elmo-dop-queue-fname (car queue)))) (elmo-folder-open folder) (unless (elmo-folder-plugged-p folder) - (error "Unplugged."))) + (error "Unplugged"))) (elmo-dop-queue-arguments (car queue))) (elmo-folder-close folder)) (quit (setq failure t)) @@ -169,7 +169,7 @@ Saved queue is old version(2.6). Clear all pending operations? ") (memq (elmo-dop-queue-method que) elmo-dop-queue-merge-method-list) (setq match-queue - (car (delete + (car (delete nil (mapcar (lambda (nqueue) diff --git a/elmo/elmo-imap4.el b/elmo/elmo-imap4.el index 15df756..5744072 100644 --- a/elmo/elmo-imap4.el +++ b/elmo/elmo-imap4.el @@ -53,7 +53,7 @@ (defvar elmo-imap4-disuse-server-flag-mailbox-regexp "^#mh" ; UW imapd "Regexp to match IMAP4 mailbox names whose message flags on server should be ignored. -(Except `\\Deleted' flag).") +\(Except `\\Deleted' flag\).") (defvar elmo-imap4-overview-fetch-chop-length 200 "*Number of overviews to fetch in one request.") @@ -82,7 +82,7 @@ (defvar elmo-imap4-use-select-to-update-status nil "*Some imapd have to send select command to update status. -(ex. UW imapd 4.5-BETA?). For these imapd, you must set this variable t.") +\(ex. UW imapd 4.5-BETA?\). For these imapd, you must set this variable t.") (defvar elmo-imap4-use-modified-utf7 nil "*Use mofidied UTF-7 (rfc2060) encoding for IMAP4 folder name.") @@ -92,7 +92,7 @@ (defvar elmo-imap4-extra-namespace-alist '(("^\\({.*/nntp}\\).*$" . ".")) ; Default is for UW's remote nntp mailbox... - "Extra namespace alist. + "Extra namespace alist. A list of cons cell like: (REGEXP . DELIMITER). REGEXP should have a grouping for namespace prefix.") ;; @@ -245,7 +245,7 @@ Debug information is inserted in the buffer \"*IMAP4 DEBUG*\"") matched)) (defmacro elmo-imap4-response-error-text (response) - "Returns text of NO, BAD, BYE, response." + "Returns text of NO, BAD, BYE response." (` (nth 1 (or (elmo-imap4-response-value (, response) 'no) (elmo-imap4-response-value (, response) 'bad) (elmo-imap4-response-value (, response) 'bye))))) diff --git a/elmo/elmo-localdir.el b/elmo/elmo-localdir.el index 4907de0..787ce67 100644 --- a/elmo/elmo-localdir.el +++ b/elmo/elmo-localdir.el @@ -91,8 +91,12 @@ 'identity (mapcar 'elmo-replace-string-as-filename - (split-string (elmo-localdir-folder-dir-name-internal folder) - "/")) + (split-string + (let ((dir-name (elmo-localdir-folder-dir-name-internal folder))) + (if (file-name-absolute-p dir-name) + (expand-file-name dir-name) + dir-name)) + "/")) "/") (expand-file-name ;;"localdir" (symbol-name (elmo-folder-type-internal folder)) @@ -307,7 +311,7 @@ (error "No such directory: %s" old) (if (file-exists-p new) (error "Already exists directory: %s" new) - (if (not (file-exists-p new-dir)) + (if (not (file-directory-p new-dir)) (elmo-make-directory new-dir)) (rename-file old new) t)))) diff --git a/elmo/elmo-map.el b/elmo/elmo-map.el index 526e587..eaac9b7 100644 --- a/elmo/elmo-map.el +++ b/elmo/elmo-map.el @@ -136,7 +136,7 @@ (concat "#" (int-to-string number)) (elmo-map-folder-location-hash-internal folder)))) -(luna-define-method elmo-folder-pack-number ((folder elmo-map-folder)) +(luna-define-method elmo-folder-pack-numbers ((folder elmo-map-folder)) (let* ((msgdb (elmo-folder-msgdb folder)) (old-number-alist (elmo-msgdb-get-number-alist msgdb)) (old-overview (elmo-msgdb-get-overview msgdb)) diff --git a/elmo/elmo-msgdb.el b/elmo/elmo-msgdb.el index 286741a..4cd49d7 100644 --- a/elmo/elmo-msgdb.el +++ b/elmo/elmo-msgdb.el @@ -408,48 +408,6 @@ content of MSGDB is changed." ret-val)) ;;; -;; parsistent mark handling -;; (for global!) - -(defvar elmo-msgdb-global-mark-alist nil) - -(defun elmo-msgdb-global-mark-delete (msgid) - (let* ((path (expand-file-name - elmo-msgdb-global-mark-filename - elmo-msgdb-directory)) - (malist (or elmo-msgdb-global-mark-alist - (setq elmo-msgdb-global-mark-alist - (elmo-object-load path)))) - match) - (when (setq match (assoc msgid malist)) - (setq elmo-msgdb-global-mark-alist - (delete match elmo-msgdb-global-mark-alist)) - (elmo-object-save path elmo-msgdb-global-mark-alist)))) - -(defun elmo-msgdb-global-mark-set (msgid mark) - (let* ((path (expand-file-name - elmo-msgdb-global-mark-filename - elmo-msgdb-directory)) - (malist (or elmo-msgdb-global-mark-alist - (setq elmo-msgdb-global-mark-alist - (elmo-object-load path)))) - match) - (if (setq match (assoc msgid malist)) - (setcdr match mark) - (setq elmo-msgdb-global-mark-alist - (nconc elmo-msgdb-global-mark-alist - (list (cons msgid mark))))) - (elmo-object-save path elmo-msgdb-global-mark-alist))) - -(defun elmo-msgdb-global-mark-get (msgid) - (cdr (assoc msgid (or elmo-msgdb-global-mark-alist - (setq elmo-msgdb-global-mark-alist - (elmo-object-load - (expand-file-name - elmo-msgdb-global-mark-filename - elmo-msgdb-directory))))))) - -;;; ;; persistent mark handling ;; (for each folder) diff --git a/elmo/elmo-multi.el b/elmo/elmo-multi.el index 8199b2e..5be1400 100644 --- a/elmo/elmo-multi.el +++ b/elmo/elmo-multi.el @@ -523,9 +523,8 @@ (+ (* (elmo-multi-folder-divide-number-internal folder) cur-number) x))) - (ignore-errors - (elmo-folder-search - (car flds) condition)))))) + (elmo-folder-search + (car flds) condition))))) (when numlist (setq numlist-list (cdr numlist-list))) (setq flds (cdr flds))) diff --git a/elmo/elmo-nntp.el b/elmo/elmo-nntp.el index d705d60..69f5a8f 100644 --- a/elmo/elmo-nntp.el +++ b/elmo/elmo-nntp.el @@ -49,7 +49,7 @@ (defvar elmo-nntp-max-number-precedes-list-active nil "Non-nil means max number of msgdb is set as the max number of `list active'. -(Needed for inn 2.3 or later?).") +\(Needed for inn 2.3 or later?\).") (defvar elmo-nntp-group-coding-system nil "A coding system for newsgroup string.") @@ -1143,8 +1143,7 @@ Returns a list of cons cells like (NUMBER . VALUE)" (elmo-list-filter from-msgs result) result))) ((string= "body" search-key) - (error -"Search by BODY is not supported (Toggle the plug off to search from caches)")) + nil) (t (let ((val (elmo-filter-value condition)) (negative (eq (elmo-filter-type condition) 'unmatch)) @@ -1193,7 +1192,8 @@ Returns a list of cons cells like (NUMBER . VALUE)" (luna-define-method elmo-folder-search :around ((folder elmo-nntp-folder) condition &optional from-msgs) - (if (elmo-folder-plugged-p folder) + (if (and (elmo-folder-plugged-p folder) + (not (string= "body" (elmo-filter-key condition)))) (elmo-nntp-search-internal folder condition from-msgs) (luna-call-next-method))) diff --git a/elmo/elmo-split.el b/elmo/elmo-split.el index 8d90e49..03a975e 100644 --- a/elmo/elmo-split.el +++ b/elmo/elmo-split.el @@ -117,7 +117,8 @@ Example: :group 'elmo) (defcustom elmo-split-default-action 'noop - "Default action for messages which pass all rules." + "Default action for messages which pass all rules. +It can be some ACTION as in `elmo-split-rule'." :type '(choice (const :tag "do not touch" noop) (const :tag "delete" delete) (string :tag "folder name") diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el index 6157174..4f019e2 100644 --- a/elmo/elmo-util.el +++ b/elmo/elmo-util.el @@ -130,7 +130,8 @@ File content is encoded with MIME-CHARSET." Directory of the file is created if it doesn't exist. File content is encoded with MIME-CHARSET." (elmo-set-work-buf - (prin1 object (current-buffer)) + (let (print-length print-level) + (prin1 object (current-buffer))) ;;;(princ "\n" (current-buffer)) (elmo-save-buffer filename mime-charset))) @@ -415,7 +416,8 @@ Return value is a cons cell of (STRUCTURE . REST)" (save-excursion (let ((filename (expand-file-name elmo-passwd-alist-file-name elmo-msgdb-directory)) - (tmp-buffer (get-buffer-create " *elmo-passwd-alist-tmp*"))) + (tmp-buffer (get-buffer-create " *elmo-passwd-alist-tmp*")) + print-length print-level) (set-buffer tmp-buffer) (erase-buffer) (prin1 elmo-passwd-alist tmp-buffer) @@ -1561,6 +1563,49 @@ NUMBER-SET is altered." (match-end matchn)) list))) (nreverse list))) +;;; +;; parsistent mark handling +;; (for global!) +;; (FIXME: this should be treated in the msgdb.) + +(defvar elmo-msgdb-global-mark-alist nil) + +(defun elmo-msgdb-global-mark-delete (msgid) + (let* ((path (expand-file-name + elmo-msgdb-global-mark-filename + elmo-msgdb-directory)) + (malist (or elmo-msgdb-global-mark-alist + (setq elmo-msgdb-global-mark-alist + (elmo-object-load path)))) + match) + (when (setq match (assoc msgid malist)) + (setq elmo-msgdb-global-mark-alist + (delete match elmo-msgdb-global-mark-alist)) + (elmo-object-save path elmo-msgdb-global-mark-alist)))) + +(defun elmo-msgdb-global-mark-set (msgid mark) + (let* ((path (expand-file-name + elmo-msgdb-global-mark-filename + elmo-msgdb-directory)) + (malist (or elmo-msgdb-global-mark-alist + (setq elmo-msgdb-global-mark-alist + (elmo-object-load path)))) + match) + (if (setq match (assoc msgid malist)) + (setcdr match mark) + (setq elmo-msgdb-global-mark-alist + (nconc elmo-msgdb-global-mark-alist + (list (cons msgid mark))))) + (elmo-object-save path elmo-msgdb-global-mark-alist))) + +(defun elmo-msgdb-global-mark-get (msgid) + (cdr (assoc msgid (or elmo-msgdb-global-mark-alist + (setq elmo-msgdb-global-mark-alist + (elmo-object-load + (expand-file-name + elmo-msgdb-global-mark-filename + elmo-msgdb-directory))))))) + ;;; File cache. (defmacro elmo-make-file-cache (path status) "PATH is the cache file name. @@ -1593,6 +1638,7 @@ If the cache is partial file-cache, TYPE is 'partial." (nth (% (/ sum 16) 2) chars) (nth (% sum 16) chars)))) +;;; (defun elmo-file-cache-get-path (msgid &optional section) "Get cache path for MSGID. If optional argument SECTION is specified, partial cache path is returned." @@ -1617,14 +1663,16 @@ SECTION is the section string." (defun elmo-file-cache-delete (path) "Delete a cache on PATH." - (when (file-exists-p path) - (if (file-directory-p path) - (progn - (dolist (file (directory-files path t "^[^\\.]")) - (delete-file file)) - (delete-directory path)) - (delete-file path)) - t)) + (unless (elmo-msgdb-global-mark-get + (elmo-cache-to-msgid (file-name-nondirectory path))) + (when (file-exists-p path) + (if (file-directory-p path) + (progn + (dolist (file (directory-files path t "^[^\\.]")) + (delete-file file)) + (delete-directory path)) + (delete-file path)) + t))) (defun elmo-file-cache-exists-p (msgid) "Returns 'section or 'entire if a cache which corresponds to MSGID exists." diff --git a/elmo/elmo-version.el b/elmo/elmo-version.el index 373a6a0..03728f6 100644 --- a/elmo/elmo-version.el +++ b/elmo/elmo-version.el @@ -40,7 +40,7 @@ ;; product-define in the first place (product-provide 'elmo-version ;; Don't forget to check `wl-version.el' and Info. - (product-define "ELMO" nil '(2 11 0))) + (product-define "ELMO" nil '(2 11 1))) ;; set version-string (product-version-as-string 'elmo-version) diff --git a/elmo/elmo.el b/elmo/elmo.el index 6a1fbc8..ad62248 100644 --- a/elmo/elmo.el +++ b/elmo/elmo.el @@ -378,7 +378,7 @@ NUMBERS is a list of message numbers to be processed.") FOLDER is the destination folder(ELMO folder structure). If UNREAD is non-nil, message is appended as unread. If optional argument NUMBER is specified, the new message number is set -(if possible).") +\(if possible\).") (luna-define-generic elmo-folder-append-messages (folder src-folder diff --git a/elmo/pldap.el b/elmo/pldap.el index 0772207..5d90138 100644 --- a/elmo/pldap.el +++ b/elmo/pldap.el @@ -104,7 +104,7 @@ It is recommended to use the `-T' switch with Nescape's implementation to avoid line wrapping. `-L' is needed to get LDIF outout. -(`-LL' is needed to get rid of comments from OpenLDAP's ldapsearch.) +\(`-LL' is needed to get rid of comments from OpenLDAP's ldapsearch.\) `-x' is needed to use simple authentication. The `-B' switch should be used to enable the retrieval of binary values." diff --git a/elmo/utf7.el b/elmo/utf7.el index 31702d7..1000d68 100644 --- a/elmo/utf7.el +++ b/elmo/utf7.el @@ -87,7 +87,8 @@ (mod (- len) modulus)) (cond - ((or (find-coding-system 'utf-7) + ((or (and (fboundp 'find-coding-system) + (find-coding-system 'utf-7)) (module-installed-p 'un-define)) (defun utf7-fragment-decode (start end &optional imap) "Decode base64 encoded fragment from START to END of UTF-7 text in buffer. @@ -126,7 +127,8 @@ Use IMAP modification if IMAP is non-nil." (delete-region start end) (insert encoded-string)))) ((and (featurep 'xemacs) - (or (find-coding-system 'utf-8) + (or (and (fboundp 'find-coding-system) + (find-coding-system 'utf-8)) (module-installed-p 'xemacs-ucs))) (defun utf7-fragment-decode (start end &optional imap) "Decode base64 encoded fragment from START to END of UTF-7 text in buffer. diff --git a/etc/VERSION b/etc/VERSION index f5d204d..99801b8 100644 --- a/etc/VERSION +++ b/etc/VERSION @@ -124,7 +124,8 @@ 2.9.x Unchained Melody 2.9.15 Undercover Of The Night -2.10.0 Venus +2.10.0 Venus +2.10.1 Watching The Wheels 2.11.x Wonderwall 2.11.0 Wanted Dead Or Alive diff --git a/samples/en/dot.wl b/samples/en/dot.wl index 9cb8805..610a989 100644 --- a/samples/en/dot.wl +++ b/samples/en/dot.wl @@ -82,9 +82,6 @@ ;;; [[ Basic Setting ]] -;; Language for day of the week in summary -(setq wl-summary-weekday-name-lang "en") - ;; Default folder for `wl-summary-goto-folder'. ;(setq wl-default-folder "+inbox") @@ -233,6 +230,10 @@ ; (setq buffers (cdr buffers)))))) ;(run-with-idle-timer 20 t 'my-wl-auto-save-draft-buffers) +;; When you encrypt message by PGP, include your public key. +;; (to make the message visible from yourself) +;(setq pgg-encrypt-for-me t) + ;;; [[ Template ]] @@ -288,14 +289,31 @@ ; ("Newsgroups" . (nil nil ("Newsgroups"))) ; ("Reply-To" . (("Reply-To") nil nil)) ; ("Mail-Reply-To" . (("Mail-Reply-To") nil nil)) +; (wl-draft-self-reply-p . (("To") ("Cc") nil)) ; ("From" . (("From") nil nil)))) -;; "C-u a" (with-argument) reply to all. -;(setq wl-draft-reply-with-argument-list -; '(("Followup-To" . (("From") nil ("Followup-To"))) -; ("Newsgroups" . (("From") nil ("Newsgroups"))) +;; old defaults < 2.11.0 +;(setq wl-draft-reply-without-argument-list +; '(((wl-draft-self-reply-p +; "Followup-To") . (("To") ("Cc") ("Followup-To"))) +; ((wl-draft-self-reply-p +; "Newsgroups") . (("To") ("Cc") ("Newsgroups"))) +; ((wl-draft-self-reply-p +; "From") . (("To") ("Cc") nil)) +; ("Followup-To" . (nil nil ("Followup-To"))) ; ("Mail-Followup-To" . (("Mail-Followup-To") nil ("Newsgroups"))) +; ("Reply-To" . (("Reply-To") ("To" "Cc" "From") ("Newsgroups"))) ; ("From" . (("From") ("To" "Cc") ("Newsgroups"))))) +;(setq wl-draft-reply-with-argument-list +; '(((wl-draft-self-reply-p +; "Followup-To") . (("To") ("Cc") ("Followup-To"))) +; ((wl-draft-self-reply-p +; "Newsgroups") . (("To") ("Cc") ("Newsgroups"))) +; ((wl-draft-self-reply-p +; "From") . (("To") ("Cc") nil)) +; ("Reply-To" . (("Reply-To") nil nil)) +; ("Mail-Reply-To" . (("Mail-Reply-To") nil nil)) +; ("From" . (("From") nil nil)))) ;;; [[ Message Display Settings ]] diff --git a/samples/ja/dot.wl b/samples/ja/dot.wl index 735aeeb..854780a 100644 --- a/samples/ja/dot.wl +++ b/samples/ja/dot.wl @@ -230,6 +230,10 @@ ; (setq buffers (cdr buffers)))))) ;(run-with-idle-timer 20 t 'my-wl-auto-save-draft-buffers) +;; PGP $B$G0E9f2=$9$k;~$K<+J,$N8x3+80$b4^$a$k!#(B +;; ($B$=$N%a%C%;!<%8$r<+J,$G$bFI$a$k$h$&$K(B) +;(setq pgg-encrypt-for-me t) + ;;; [[ $B%F%s%W%l!<%H(B ]] @@ -291,14 +295,31 @@ ; ("Newsgroups" . (nil nil ("Newsgroups"))) ; ("Reply-To" . (("Reply-To") nil nil)) ; ("Mail-Reply-To" . (("Mail-Reply-To") nil nil)) +; (wl-draft-self-reply-p . (("To") ("Cc") nil)) ; ("From" . (("From") nil nil)))) -;; "C-u a" (with-argument)$B$G$"$l$P4X78$9$kA4$F$N?M!&Ej9F@h$KJV?.$9$k!#(B -;(setq wl-draft-reply-with-argument-list -; '(("Followup-To" . (("From") nil ("Followup-To"))) -; ("Newsgroups" . (("From") nil ("Newsgroups"))) +;; 2.11.0 $B0JA0$N%G%U%)%k%H@_Dj(B +;(setq wl-draft-reply-without-argument-list +; '(((wl-draft-self-reply-p +; "Followup-To") . (("To") ("Cc") ("Followup-To"))) +; ((wl-draft-self-reply-p +; "Newsgroups") . (("To") ("Cc") ("Newsgroups"))) +; ((wl-draft-self-reply-p +; "From") . (("To") ("Cc") nil)) +; ("Followup-To" . (nil nil ("Followup-To"))) ; ("Mail-Followup-To" . (("Mail-Followup-To") nil ("Newsgroups"))) +; ("Reply-To" . (("Reply-To") ("To" "Cc" "From") ("Newsgroups"))) ; ("From" . (("From") ("To" "Cc") ("Newsgroups"))))) +;(setq wl-draft-reply-with-argument-list +; '(((wl-draft-self-reply-p +; "Followup-To") . (("To") ("Cc") ("Followup-To"))) +; ((wl-draft-self-reply-p +; "Newsgroups") . (("To") ("Cc") ("Newsgroups"))) +; ((wl-draft-self-reply-p +; "From") . (("To") ("Cc") nil)) +; ("Reply-To" . (("Reply-To") nil nil)) +; ("Mail-Reply-To" . (("Mail-Reply-To") nil nil)) +; ("From" . (("From") nil nil)))) ;;; [[ $B%a%C%;!<%8I=<($N@_Dj(B ]] diff --git a/tests/ChangeLog b/tests/ChangeLog index e479f1d..87ee7da 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,38 @@ +2003-01-28 TAKAHASHI Kaoru + + * check-modules.el (test-apel-version): Renamed from + `check-modules-apel-version'. + (test-modules-charsets-mime-charset-alist): Ditto. + (test-x-face-xmas, test-x-face-mule): Ditto. + (test-flim-mime-entity, test-flim-mime-content-information): Ditto. + (test-flim-encoded-word, test-flim-content-transfer-encoding): Ditto. + (test-flim-mailcap, test-flim-std11, test-flim-smtp): Ditto. + (test-semi-mime-edit, test-semi-mime-view, test-semi-mime-play): Ditto. + + * check-base64.el (test-base64-encode-1): + Renamed from `check-base64-encode-1'. + (test-base64-encode-2, test-base64-encode-3): Ditto. + (test-base64-encode-4, test-base64-encode-5): Ditto. + +2003-01-17 TAKAHASHI Kaoru + + * test-elmo-localdir.el: New file. + (test-elmo-folder-expand-msgdb-path-1): New testcase. + (test-elmo-folder-expand-msgdb-path-2): Ditto. + (test-elmo-folder-expand-msgdb-path-3): Ditto. + + * test-dist.el (test-wl-modules-exists): Fix void variable. + (test-elmo-modules-exists): Ditto. + +2003-01-12 TAKAHASHI Kaoru + + * check-modules.el (check-modules-semi-mime-edit): Check + `mime-create-tag'. + +2003-01-06 TAKAHASHI Kaoru + + * test-dist.el (test-wl-demo-copyright-notice): Check always. + 2002-12-11 TAKAHASHI Kaoru * test-dist.el (test-version-toplevel-changelog): Fixed regexp. diff --git a/tests/check-base64.el b/tests/check-base64.el index c21707b..57cefd5 100644 --- a/tests/check-base64.el +++ b/tests/check-base64.el @@ -4,21 +4,21 @@ ;; mel-b-ccl on XEmacs 21.1 ;; -(luna-define-method check-base64-encode-1 ((case check-base64)) +(luna-define-method test-base64-encode-1 ((case check-base64)) (require 'elmo-util) (lunit-assert (string= "QQ==" (elmo-base64-encode-string "A")))) -(luna-define-method check-base64-encode-2 ((case check-base64)) +(luna-define-method test-base64-encode-2 ((case check-base64)) (require 'elmo-util) (lunit-assert (string= "QUE=" (elmo-base64-encode-string "AA")))) -(luna-define-method check-base64-encode-3 ((case check-base64)) +(luna-define-method test-base64-encode-3 ((case check-base64)) (require 'elmo-util) (lunit-assert (string= @@ -33,7 +33,7 @@ (elmo-base64-encode-string "" t) (wrong-number-of-arguments))) -(luna-define-method check-base64-encode-4 ((case check-base64)) +(luna-define-method test-base64-encode-4 ((case check-base64)) (lunit-assert (check-base64-encode-string-has-no-line-break-argument))) @@ -48,7 +48,6 @@ t) (wrong-number-of-arguments))) -(luna-define-method check-base64-encode-5 ((case check-base64)) +(luna-define-method test-base64-encode-5 ((case check-base64)) (lunit-assert (check-base64-encode-region-has-no-line-break-argument))) - diff --git a/tests/check-modules.el b/tests/check-modules.el index 1b1744c..e2328b0 100644 --- a/tests/check-modules.el +++ b/tests/check-modules.el @@ -8,18 +8,18 @@ ;;; ;; APEL -(luna-define-method check-modules-apel-version ((case check-modules)) +(luna-define-method test-apel-version ((case check-modules)) (require 'apel-ver) (lunit-assert (product-version>= (product-find 'apel-ver) '(10 3)))) -(luna-define-method check-modules-charsets-mime-charset-alist ((case check-modules)) +(luna-define-method test-modules-charsets-mime-charset-alist ((case check-modules)) (require 'mcharset) (lunit-assert (not (memq nil charsets-mime-charset-alist)))) ;; X-Face on XEmacs -(luna-define-method check-modules-x-face-xmas ((case check-modules)) +(luna-define-method test-x-face-xmas ((case check-modules)) (when (and (locate-library "x-face") (featurep 'xemacs)) (lunit-assert (check-modules-x-face-xmas-wl-display-x-face-was-argument-required)))) @@ -34,7 +34,7 @@ (wrong-number-of-arguments))) ;; x-face-mule -(luna-define-method check-modules-x-face-mule ((case check-modules)) +(luna-define-method test-x-face-mule ((case check-modules)) (when (and (locate-library "x-face-mule") (not (featurep 'xemacs)) (not (locate-library "x-face-e21"))) @@ -52,7 +52,7 @@ (wrong-number-of-arguments))) ;; MIME entity (FLIM API Version 1.14 Draft Release 3) -(luna-define-method check-modules-flim-mime-entity ((case check-modules)) +(luna-define-method test-flim-mime-entity ((case check-modules)) (require 'mime) (lunit-assert (fboundp 'mime-open-entity)) ; [Required] (lunit-assert (fboundp 'mime-entity-children)) ; [Required] @@ -67,7 +67,7 @@ (lunit-assert (fboundp 'mime-write-entity-body))) ; [Required] ;; MIME content information (FLIM API Version 1.14 Draft Release 3) -(luna-define-method check-modules-flim-mime-content-information ((case check-modules)) +(luna-define-method test-flim-mime-content-information ((case check-modules)) (require 'mime) (lunit-assert (fboundp 'mime-content-type-primary-type)) ; [Required] (lunit-assert (fboundp 'mime-content-type-subtype)) ; [Required] @@ -76,13 +76,13 @@ (lunit-assert (fboundp 'mime-content-disposition-parameter))) ; [Required] ;; encoded-word (FLIM API Version 1.14 Draft Release 3) -(luna-define-method check-modules-flim-encoded-word ((case check-modules)) +(luna-define-method test-flim-encoded-word ((case check-modules)) (require 'mime) (lunit-assert (fboundp 'mime-decode-field-body)) ; [Required] (lunit-assert (fboundp 'mime-encode-field-body))) ; [Required] ;; Content-Transfer-Encoding (FLIM API Version 1.14 Draft Release 3) -(luna-define-method check-modules-flim-content-transfer-encoding ((case check-modules)) +(luna-define-method test-flim-content-transfer-encoding ((case check-modules)) (require 'mel) ;; mime-decode-string (string encoding) [Required] (lunit-assert (fboundp 'mime-decode-string)) @@ -98,7 +98,7 @@ (lunit-assert (fboundp 'binary-insert-encoded-file))) ; [Required] ;; Mailcap (FLIM API Version 1.14 Draft Release 3) -(luna-define-method check-modules-flim-mailcap ((case check-modules)) +(luna-define-method test-flim-mailcap ((case check-modules)) (require 'mime-conf) (lunit-assert (fboundp 'mime-parse-mailcap-buffer)) ; [Required] (lunit-assert (boundp 'mime-mailcap-file)) ; [Required] @@ -106,7 +106,7 @@ (lunit-assert (fboundp 'mime-format-mailcap-command))) ; [Required] ;; STD 11 (FLIM API Version 1.14 Draft Release 3) -(luna-define-method check-modules-flim-std11 ((case check-modules)) +(luna-define-method test-flim-std11 ((case check-modules)) (require 'std11) (lunit-assert (fboundp 'std11-narrow-to-header)) ; [Required] (lunit-assert (fboundp 'std11-fetch-field)) ; [Required] @@ -114,20 +114,21 @@ (lunit-assert (fboundp 'std11-unfold-string))) ; [Required] ;; SMTP (FLIM API Version 1.14 Draft Release 3) -(luna-define-method check-modules-flim-smtp ((case check-modules)) +(luna-define-method test-flim-smtp ((case check-modules)) (require 'smtp) (lunit-assert (fboundp 'smtp-send-buffer))) ; [Suggest] ;; SEMI -(luna-define-method check-modules-semi-mime-edit ((case check-modules)) +(luna-define-method test-semi-mime-edit ((case check-modules)) (require 'mime-edit) (lunit-assert (fboundp 'mime-find-file-type)) (lunit-assert (fboundp 'mime-edit-content-beginning)) (lunit-assert (fboundp 'mime-edit-content-end)) - (lunit-assert (fboundp 'mime-edit-preview-message))) + (lunit-assert (fboundp 'mime-edit-preview-message)) + (lunit-assert (fboundp 'mime-create-tag))) -(luna-define-method check-modules-semi-mime-view ((case check-modules)) +(luna-define-method test-semi-mime-view ((case check-modules)) (require 'mime-view) (lunit-assert (fboundp 'mime-display-message)) (lunit-assert (fboundp 'mime-maybe-hide-echo-buffer)) @@ -137,6 +138,6 @@ (lunit-assert (fboundp 'mime-display-text/plain)) (lunit-assert (fboundp 'mime-entity-situation))) -(luna-define-method check-modules-semi-mime-play ((case check-modules)) +(luna-define-method test-semi-mime-play ((case check-modules)) (require 'mime-play) (lunit-assert (fboundp 'mime-store-message/partial-piece))) diff --git a/tests/test-dist.el b/tests/test-dist.el index d2c82f8..5b276aa 100644 --- a/tests/test-dist.el +++ b/tests/test-dist.el @@ -13,7 +13,7 @@ (lambda (module) (setq filename (concat (symbol-name module) ".el")) (unless (file-exists-p (expand-file-name filename WLDIR)) - (add-to-list 'lost symbol))) + (add-to-list 'lost filename))) WL-MODULES) lost)))) @@ -26,7 +26,7 @@ (lambda (module) (setq filename (concat (symbol-name module) ".el")) (unless (file-exists-p (expand-file-name filename ELMODIR)) - (add-to-list 'lost symbol))) + (add-to-list 'lost filename))) ELMO-MODULES) lost)))) @@ -155,11 +155,10 @@ (nth 1 (product-version (product-find 'wl-version))))))) '("README" "README.ja")))) -;; copyright notice (beta only) +;; copyright notice (luna-define-method test-wl-demo-copyright-notice ((case test-dist)) (require 'wl-demo) - (when (string= (wl-version-status) "beta") - (lunit-assert - (string-match - (format-time-string "%Y" (current-time)) - wl-demo-copyright-notice)))) + (lunit-assert + (string-match + (format-time-string "%Y" (current-time)) + wl-demo-copyright-notice))) diff --git a/wl/ChangeLog b/wl/ChangeLog index e385ab1..bc5810b 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,251 @@ +2003-01-29 Yoichi NAKAYAMA + + * wl-news.el.in (wl-news-previous-version-save): Bind + print-length and print-level. + * wl-thread.el (wl-thread-save-entities): Ditto. + (wl-thread-save-top-list): Bind print-length. + +2003-01-28 Yoichi NAKAYAMA + + * wl-highlight.el (wl-highlight-summary-line-string): Use + wl-summary-score-below-mark, wl-summary-score-over-mark. + (wl-highlight-summary-current-line): Ditto. + +2003-01-27 Yoichi NAKAYAMA + + * wl-draft.el (wl-draft-insert-from-field): Encode wl-from and + insert it. + +2003-01-21 Kenichi OKADA + + * wl-vars.el (wl-message-id-use-wl-from): Change defalut to t. + +2003-01-20 Yoichi NAKAYAMA + + * wl-mime.el (wl-message-delete-current-part): Avoid error on + message without msgid. + Rewrite with elmo-folder-move-messages. + Set wl-message-buffer to nil. + + * wl-summary.el (wl-summary-erase-subr): New function. Use + elmo-folder-move-messages. + (wl-summary-erase): Call it. + (wl-summary-target-mark-erase): Ditto. + +2003-01-14 Yoichi NAKAYAMA + + * wl-summary.el (wl-summary-exec-subr): Unset wl-message-buffer if + it is not up-tp-date. + +2003-01-12 Yoichi NAKAYAMA + + * wl-folder.el (wl-folder-empty-trash): Set and show up summary + buffer after calling `wl-summary-goto-folder-subr' without the + argument `interactive'. + (wl-folder-set-current-entity-id): Enclose by save-current-buffer. + +2003-01-12 TAKAHASHI Kaoru + + * wl-draft.el (wl-draft-remove-text-plain-tag): Use + `mime-create-tag'. Use `string=' instead of `looking-at'. + +2003-01-11 Yoichi NAKAYAMA + + * wl-news.el.in (wl-news-send-news): Add 3rd argument `folder' + to avoid compile warning. + + * wl-summary.el (wl-summary-goto-folder-subr): Fix logic: set + entity-id when folder is given. + * wl-folder.el (wl-folder-set-current-entity-id): Don't use + save-excursion, use save-selected-window instead. + Select folder buffer window if exists. + (To correct behavior with wl-folder-move-cur-folder.) + +2003-01-10 Masahiro Murata + + * wl-draft.el (wl-draft-reedit): Avoid error on Meadow [wl:11209]. + +2003-01-06 Mito + + * wl-summary.el (wl-summary-line-list-info): Use %f to make + list-count instead of %d. + +2003-01-06 Yoichi NAKAYAMA + + * wl-news.el.in (wl-news-buffer-oldest-version): New local variable. + (wl-news): Set it. + (wl-news-append-to-folder): Use it. + + * wl-news.el.in (wl-news-send-news): Append to specified folder + instead of wl-default-folder. + (wl-news-append-to-folder): Show error message with specified folder. + + * wl-vars.el: Follow "Left Margin Convention" in Emacs Manual. + In most major modes, Emacs assumes that any opening + delimiter found at the left margin is the start of a + top-level definition, or defun. Therefore, *never put an + opening delimiter at the left margin unless it should have + that significance.* + + * wl-draft.el (wl-draft-reply): List in r-list can contain function. + +2003-01-05 NAKAJIMA Mikio + + * wl-draft.el (wl-draft-self-reply-p): Add doc string. + +2003-01-01 TAKAHASHI Kaoru + + * wl-demo.el (wl-demo-copyright-notice): Add 2003. + +2002-12-31 Ron Isaacson + + * wl-summary.el (wl-summary-mark-collect): Revive missing return + for sequential numbering case. + +2002-12-25 Yoichi NAKAYAMA + + * wl-vars.el (wl-draft-reply-with-argument-list): Change default + value. + (wl-draft-reply-without-argument-list): Ditto. + (wl-draft-reply-myself-with-argument-list): Abolish. + (wl-draft-reply-myself-without-argument-list): Ditto. + * wl-draft.el (wl-draft-self-reply-p): New function. + (wl-draft-reply-list-symbol): Merge into `wl-draft-reply'. + +2002-12-24 Yoichi NAKAYAMA + + * wl-e21.el (toplevel): Do not set wl-folder-mode-map. + (avoid error for the case without byte-compiling) + +2002-12-23 Kenichi OKADA + + * wl-news.el.in (wl-news-append-to-folder): New function. + (wl-news-exit): Rewrite. + (wl-news-discard-and-mail): Merge to `wl-news-exit'. + +2002-12-22 Kenichi OKADA + + * wl-draft.el (wl-draft-reply-position): New function. + (wl-draft-reply-position): Fix. + * wl-summary.el (wl-summary-reply): Use `wl-draft-reply-position'. + (wl-summary-target-mark-reply-with-citation): Ditto. + (wl-summary-reply-with-citation): Ditto. + * wl-vars.el (wl-draft-reply-default-position): New variable. + +2002-12-22 Kenichi OKADA + + * wl-draft.el (wl-draft-send): Preview when interactive send. + +2002-12-22 Kenichi OKADA + + * wl-draft.el (wl-draft-reply): Set default position. + * wl-summary.el (wl-summary-reply): Ditto. + (wl-summary-reply-with-citation): Ditto. + (wl-summary-target-mark-reply-with-citation): Ditto. + +2002-12-21 Yoichi NAKAYAMA + + * wl-news.el.in (wl-news-lang): Set default value according to + current-language-environment. + (wl-news-append-news): Do nothing when news-list is nil. + +2002-12-21 Kenichi OKADA + + * wl-news.el.in (wl-news-mode-map): Add new keybind. + (wl-news): Change message. + (wl-news-exit): Check buffer. + (wl-news-force-exit): New function. + (wl-news-show-all): New function. + (wl-news-discard-and-exit): Fix. + +2002-12-21 Yoichi NAKAYAMA + + * wl-vars.el (wl-summary-weekday-name-lang): Set default value + according to current-language-environment. + + * wl-news.el.in (wl-news): If arg, show all NEWS after + wl-news-default-previous-version. + +2002-12-21 Kenichi OKADA + + * wl-news.el.in (wl-news-check): Rewritten. + (wl-news-previous-version-load): Change data type. + (wl-news-previous-version-save): Change data type. + (wl-news-append-news): Add return value. + (wl-news-check-news): New function. + (wl-news-already-current-p): New function. + (wl-news-send-news): Rewritten. + (wl-news-mode-map): Add new keybind. + (wl-news): Rewritten. + (wl-news-exit): Rewritten. + (wl-news-discard-and-mail): New function. + (wl-news-send-to-address): Abolished. + * wl.el (wl-init): Delete a message. + +2002-12-21 Kenichi OKADA + + * wl-news.el.in (wl-news-exit): Update previous version. + * wl.el (wl-folder-mode-menu-spec): Add 'Wanderlust NEWS'. + +2002-12-21 Kenichi OKADA + + * wl-news.el.in (wl-news): Add `delete-other-windows'. + +2002-12-21 Kenichi OKADA + + * wl-news.el.in (wl-news): New function. + (wl-news-mode): New function. + (wl-news-next-line): New function. + (wl-news-next-page): New function. + (wl-news-exit): New function. + (wl-news-buf-name): New variable. + (wl-news-mode-map): New variable. + (wl-news-winconf): New variable. + (wl-news-append-news): Add an option. + +2002-12-20 Kenichi OKADA + + * wl-news.el.in (wl-news-send-news): Add 'Date' header. + +2002-12-20 Yoichi NAKAYAMA + + * wl-news.el.in (wl-news-send-to-address): New variable. + (wl-news-send-news): Use it. + (wl-news-check): Call wl-news-send-news if wl-news-send-to-address. + Return updating status. + * wl.el (wl-init): Show message when wl-news-check returns non-nil. + +2002-12-20 Kenichi OKADA + + * wl-news.el.in (wl-news-send-news): Delete + Organization and X-Face. + +2002-12-20 Kenichi OKADA + + * wl-news.el.in (wl-news-check): Fix for `wl-news-lang'. + (wl-news-append-news): New function. + (wl-news-send-news): New function. + +2002-12-20 Kenichi OKADA + + * Version number is increased to 2.11.1. + +2002-12-19 Kenichi OKADA + + * wl-news.el.in : New file. + +2002-12-19 Kenichi OKADA + + * wl-vars.el (wl-draft-reply-with-argument-list): Change + default value. + (wl-draft-reply-without-argument-list): Ditto. + +2002-12-19 Kenichi OKADA + + * wl-vars.el (wl-message-buffer-prefetch-depth): Change default value. + (wl-message-buffer-prefetch-idle-time): Ditto. + (wl-message-buffer-prefetch-folder-type-list): Ditto. + 2002-12-13 Yuuichi Teranishi * wl-thread.el (wl-thread-insert-message): Use diff --git a/wl/wl-acap.el b/wl/wl-acap.el index c72a3d9..8ecd7c2 100644 --- a/wl/wl-acap.el +++ b/wl/wl-acap.el @@ -116,7 +116,7 @@ If nil, default acap port is used." proc entries settings folder-top type caches msgdb-dir) (if (null (car service)) (if (setq caches - (delq + (delq nil (mapcar (lambda (dirent) @@ -133,7 +133,7 @@ If nil, default acap port is used." (expand-file-name "acap" elmo-msgdb-directory))))))) - (if (y-or-n-p "No ACAP service found. Try cache? ") + (if (y-or-n-p "No ACAP service found. Try cache? ") (let (selected rpath alist) (setq alist (mapcar @@ -149,8 +149,8 @@ If nil, default acap port is used." alist)) msgdb-dir (file-name-directory selected) entries (elmo-object-load selected))) - (error "No ACAP service found.")) - (error "No ACAP service found.")) + (error "No ACAP service found")) + (error "No ACAP service found")) (setq proc (acap-open (car service) wl-acap-user (upcase (symbol-name @@ -162,7 +162,7 @@ If nil, default acap port is used." "/~/") '((RETURN ("*")))))) (when entries - (elmo-object-save + (elmo-object-save (expand-file-name (concat "acap/" (car service) "/" wl-acap-user "/" wl-acap-cache-filename) diff --git a/wl/wl-demo.el b/wl/wl-demo.el index 2a822bd..9e85263 100644 --- a/wl/wl-demo.el +++ b/wl/wl-demo.el @@ -29,7 +29,7 @@ ;;; Code: (defconst wl-demo-copyright-notice - "Copyright (C) 1998-2002 Yuuichi Teranishi " + "Copyright (C) 1998-2003 Yuuichi Teranishi " "A declaration of the copyright on Wanderlust.") (eval-when-compile diff --git a/wl/wl-draft.el b/wl/wl-draft.el index b9b2870..7e20690 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -161,48 +161,11 @@ e.g. "Insert From field." ;; Put the "From:" field in unless for some odd reason ;; they put one in themselves. - (let* ((login (or user-mail-address (user-login-name))) - (fullname (user-full-name))) - (cond ((eq mail-from-style 'angles) - (insert "From: " fullname) - (let ((fullname-start (+ (point-min) (length "From: "))) - (fullname-end (point-marker))) - (goto-char fullname-start) - ;; Look for a character that cannot appear unquoted - ;; according to RFC 822. - (if (re-search-forward "[^- !#-'*+/-9=?A-Z^-~]" - fullname-end 1) - (progn - ;; Quote fullname, escaping specials. - (goto-char fullname-start) - (insert "\"") - (while (re-search-forward "[\"\\]" - fullname-end 1) - (replace-match "\\\\\\&" t)) - (insert "\"")))) - (insert " <" login ">\n")) - ((eq mail-from-style 'parens) - (insert "From: " login " (") - (let ((fullname-start (point))) - (insert fullname) - (let ((fullname-end (point-marker))) - (goto-char fullname-start) - ;; RFC 822 says \ and nonmatching parentheses - ;; must be escaped in comments. - ;; Escape every instance of ()\ ... - (while (re-search-forward "[()\\]" fullname-end 1) - (replace-match "\\\\\\&" t)) - ;; ... then undo escaping of matching parentheses, - ;; including matching nested parentheses. - (goto-char fullname-start) - (while (re-search-forward - "\\(\\=\\|[^\\]\\(\\\\\\\\\\)*\\)\\\\(\\(\\([^\\]\\|\\\\\\\\\\)*\\)\\\\)" - fullname-end 1) - (replace-match "\\1(\\3)" t) - (goto-char fullname-start)))) - (insert ")\n")) - ((not mail-from-style) - (insert "From: " login "\n"))))) + (let (from) + (condition-case err + (setq from (wl-draft-eword-encode-address-list wl-from)) + (error (error "Please look at `wl-from' again"))) + (insert "From: " from "\n"))) (defun wl-draft-insert-x-face-field () "Insert X-Face header." @@ -315,21 +278,14 @@ e.g. (mail-position-on-field "To")) (defun wl-draft-strip-subject-re (subject) - "Remove \"Re:\" from subject lines. Shamelessly copied from Gnus." + "Remove \"Re:\" from SUBJECT string. Shamelessly copied from Gnus." (if (string-match wl-subject-prefix-regexp subject) (substring subject (match-end 0)) subject)) -(defun wl-draft-reply-list-symbol (with-arg) - "Return symbol `wl-draft-reply-*-argument-list' match condition. -Check WITH-ARG and From: field." - (if (wl-address-user-mail-address-p (or (elmo-field-body "From") "")) - (if with-arg - 'wl-draft-reply-myself-with-argument-list - 'wl-draft-reply-myself-without-argument-list) - (if with-arg - 'wl-draft-reply-with-argument-list - 'wl-draft-reply-without-argument-list))) +(defun wl-draft-self-reply-p () + "Return t when From address in the current message is user's self one or not." + (wl-address-user-mail-address-p (or (elmo-field-body "From") ""))) (defun wl-draft-reply (buf with-arg summary-buf &optional number) "Reply to BUF buffer message. @@ -342,7 +298,8 @@ Reply to author if WITH-ARG is non-nil." (with-current-buffer summary-buf (setq parent-folder (wl-summary-buffer-folder-name)))) (set-buffer (or buf mime-mother-buffer)) - (setq r-list (symbol-value (wl-draft-reply-list-symbol with-arg))) + (setq r-list (if with-arg wl-draft-reply-with-argument-list + wl-draft-reply-without-argument-list)) (catch 'done (while r-list (when (let ((condition (car (car r-list)))) @@ -351,8 +308,15 @@ Reply to author if WITH-ARG is non-nil." ((listp condition) (catch 'done (while condition - (if (not (std11-field-body (car condition))) - (throw 'done nil)) + (cond + ((stringp (car condition)) + (or (std11-field-body (car condition)) + (throw 'done nil))) + ((symbolp (car condition)) + (or (funcall (car condition)) + (throw 'done nil))) + (t + (debug))) (setq condition (cdr condition))) t)) ((symbolp condition) @@ -385,8 +349,8 @@ Reply to author if WITH-ARG is non-nil." ",")))) (throw 'done nil)) (setq r-list (cdr r-list))) - (error "No match field: check your `%s'" - (symbol-name (wl-draft-reply-list-symbol with-arg)))) + (error "No match field: check your `wl-draft-reply-%s-argument-list'" + (if with-arg "with" "without"))) (setq subject (std11-field-body "Subject")) (setq to (wl-parse-addresses to) cc (wl-parse-addresses cc)) @@ -489,6 +453,22 @@ Reply to author if WITH-ARG is non-nil." wl-draft-config-variables))) (run-hooks 'wl-reply-hook)) +(defun wl-draft-reply-position (position) + (cond ((eq position 'body) + (wl-draft-body-goto-top)) + ((eq position 'bottom) + (wl-draft-body-goto-bottom)) + ((eq position 'top) + (goto-char (point-min))) + ((and (stringp position) + (std11-field-body position)) + (progn (mail-position-on-field position) + (wl-draft-beginning-of-line))) + ((listp position) + (while (car position) + (wl-draft-reply-position (car position)) + (setq position (cdr position)))))) + (defun wl-draft-add-references () (wl-draft-add-in-reply-to "References")) @@ -702,7 +682,7 @@ Reply to author if WITH-ARG is non-nil." (or from "you"))))) (mail-indent-citation))) -(defvar wl-draft-buffer nil "Draft buffer to yank content") +(defvar wl-draft-buffer nil "Draft buffer to yank content.") (defun wl-draft-yank-to-draft-buffer (buffer) "Yank BUFFER content to `wl-draft-buffer'." (set-buffer wl-draft-buffer) @@ -755,7 +735,7 @@ Reply to author if WITH-ARG is non-nil." (switch-to-buffer sum-buf)))))))) (defun wl-draft-delete (editing-buffer) - "kill the editing draft buffer and delete the file corresponds to it." + "Kill the editing draft buffer and delete the file corresponds to it." (save-excursion (when editing-buffer (set-buffer editing-buffer) @@ -1284,7 +1264,17 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed" ;; (wl-draft-config-exec) (run-hooks 'wl-draft-send-hook) (when (or (not wl-interactive-send) - (y-or-n-p "Do you really want to send current draft? ")) + (let (result) + (wl-draft-preview-message) + (goto-char (point-min)) + (condition-case nil + (setq result + (y-or-n-p "Do you really want to send current draft? ")) + (quit + (mime-preview-quit) + (signal 'quit nil))) + (mime-preview-quit) + result)) (let ((send-mail-function 'wl-draft-raw-send) (editing-buffer (current-buffer)) (sending-buffer (wl-draft-generate-clone-buffer @@ -1327,7 +1317,7 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed" (kill-buffer sending-buffer)))))) (defun wl-draft-mime-bcc-field () - "Return the MIME-Bcc field body. The field is deleted." + "Return the MIME-Bcc field body. The field is deleted." (prog1 (std11-field-body wl-draft-mime-bcc-field-name) (wl-draft-delete-field wl-draft-mime-bcc-field-name))) @@ -1698,10 +1688,9 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed" ;; insert symbol-value: string (symbol . nil) ;; do nothing nil ;; do nothing - ) -" + )" (unless (eq major-mode 'wl-draft-mode) - (error "wl-draft-create-header must be use in wl-draft-mode.")) + (error "`wl-draft-create-header' must be use in wl-draft-mode")) (let ((halist header-alist) field value) (while halist @@ -1736,7 +1725,7 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed" (defun wl-draft-prepare-edit () (unless (eq major-mode 'wl-draft-mode) - (error "wl-draft-create-header must be use in wl-draft-mode.")) + (error "`wl-draft-create-header' must be use in wl-draft-mode")) (let (change-major-mode-hook) (wl-draft-editor-mode) (when wl-draft-write-file-function @@ -1866,7 +1855,7 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed" (cdar condition)) (setq condition (cdr condition))))) (unless elmo-nntp-default-function - (error "wl-draft-nntp-send: posting-function is nil.")) + (error "wl-draft-nntp-send: posting-function is nil")) (if (not (elmo-plugged-p elmo-nntp-default-server elmo-nntp-default-port)) (wl-draft-set-sent-message 'news 'unplugged (cons elmo-nntp-default-server @@ -1899,8 +1888,9 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed" (defun wl-draft-remove-text-plain-tag () "Remove text/plain tag of mime-edit." - (if (looking-at "^--\\[\\[text/plain\\]\\]$") - (delete-region (point-at-bol)(1+ (point-at-eol))))) + (when (string= (mime-create-tag "text" "plain") + (buffer-substring-no-properties (point-at-bol)(point-at-eol))) + (delete-region (point-at-bol)(1+ (point-at-eol))))) (defun wl-draft-reedit (number) (let ((draft-folder (wl-folder-get-elmo-folder wl-draft-folder)) @@ -1937,6 +1927,7 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed" (set-buffer buffer) (setq wl-draft-parent-folder "") (insert-file-contents-as-binary file-name) + (elmo-delete-cr-buffer) (let((mime-edit-again-ignored-field-regexp "^\\(Content-.*\\|Mime-Version\\):")) (wl-draft-decode-message-in-buffer)) diff --git a/wl/wl-e21.el b/wl/wl-e21.el index 9fae1d9..84259de 100644 --- a/wl/wl-e21.el +++ b/wl/wl-e21.el @@ -69,7 +69,6 @@ (require 'wl-draft) (require 'wl-message) (require 'wl-highlight) - (defvar-maybe wl-folder-mode-map (make-sparse-keymap)) (defvar-maybe wl-draft-mode-map (make-sparse-keymap))) (add-hook 'wl-folder-mode-hook 'wl-setup-folder) diff --git a/wl/wl-folder.el b/wl/wl-folder.el index 72c5628..66fd01b 100644 --- a/wl/wl-folder.el +++ b/wl/wl-folder.el @@ -116,6 +116,8 @@ ["Write a message" wl-draft t] ["Write for current folder" wl-folder-write-current-folder t] "----" + ["Wanderlust NEWS" wl-news t] + "----" ["Toggle Plug Status" wl-toggle-plugged t] ["Change Plug Status" wl-plugged-change t] "----" @@ -330,7 +332,7 @@ Default HASHTB is `wl-folder-elmo-folder-hashtb'." (or (, hashtb) wl-folder-elmo-folder-hashtb)))) (defmacro wl-folder-get-elmo-folder (entity &optional no-cache) - "Get elmo folder structure from entity." + "Get elmo folder structure from ENTITY." (` (if (, no-cache) (elmo-make-folder (elmo-string (, entity))) (or (wl-folder-elmo-folder-cache-get (, entity)) @@ -348,7 +350,7 @@ Default HASHTB is `wl-folder-elmo-folder-hashtb'." (forward-line 1)) (defun wl-folder-prev-entity-skip-invalid (&optional hereto) - "move to previous entity. skip unsubscribed or removed entity." + "Move to previous entity. skip unsubscribed or removed entity." (interactive) (if hereto (end-of-line)) @@ -499,11 +501,11 @@ Default HASHTB is `wl-folder-elmo-folder-hashtb'." (let ((cur-buf (current-buffer)) (wl-auto-select-first nil) trash-buf emptied) + (wl-summary-goto-folder-subr wl-trash-folder 'force-update) + (setq trash-buf (wl-summary-get-buffer-create wl-trash-folder)) (if wl-stay-folder-window - (wl-folder-select-buffer - (wl-summary-get-buffer-create wl-trash-folder))) - (wl-summary-goto-folder-subr wl-trash-folder 'force-update nil nil t) - (setq trash-buf (current-buffer)) + (wl-folder-select-buffer trash-buf) + (switch-to-buffer trash-buf)) (unwind-protect (setq emptied (wl-summary-delete-all-msgs)) (when emptied @@ -952,21 +954,21 @@ Optional argument ARG is repeart count." (goto-char wl-folder-buffer-cur-point)))) (defun wl-folder-set-current-entity-id (entity-id) - (let ((buf (get-buffer wl-folder-buffer-name))) + (let* ((buf (get-buffer wl-folder-buffer-name)) + (buf-win (get-buffer-window buf))) (if buf - (save-excursion - (set-buffer buf) - (setq wl-folder-buffer-cur-entity-id entity-id) - (setq wl-folder-buffer-cur-path (wl-folder-get-path wl-folder-entity - entity-id)) - (wl-highlight-folder-path wl-folder-buffer-cur-path) - (and wl-folder-move-cur-folder - wl-folder-buffer-cur-point - (goto-char wl-folder-buffer-cur-point)))) - (if (eq (current-buffer) buf) - (and wl-folder-move-cur-folder - wl-folder-buffer-cur-point - (goto-char wl-folder-buffer-cur-point))))) + (save-current-buffer + (save-selected-window + (if buf-win + (select-window buf-win) + (set-buffer buf)) + (setq wl-folder-buffer-cur-entity-id entity-id) + (setq wl-folder-buffer-cur-path + (wl-folder-get-path wl-folder-entity entity-id)) + (wl-highlight-folder-path wl-folder-buffer-cur-path) + (and wl-folder-move-cur-folder + wl-folder-buffer-cur-point + (goto-char wl-folder-buffer-cur-point))))))) (defun wl-folder-check-current-entity () "Check folder at position. @@ -2075,7 +2077,7 @@ If FOLDER is multi, return comma separated string (cross post)." nil))) (defun wl-folder-guess-mailing-list-by-refile-rule (entity) - "Return ML address guess by FOLDER. + "Return ML address guess by ENTITY. Use `wl-subscribed-mailing-list' and `wl-refile-rule-alist'." (let ((flist (elmo-folder-get-primitive-list @@ -2113,7 +2115,7 @@ Use `wl-subscribed-mailing-list' and `wl-refile-rule-alist'." (elmo-string-matched-member tokey wl-subscribed-mailing-list t))))) (defun wl-folder-guess-mailing-list-by-folder-name (entity) - "Return ML address guess by FOLDER name's last hierarchy. + "Return ML address guess by ENTITY name's last hierarchy. Use `wl-subscribed-mailing-list'." (let ((flist (elmo-folder-get-primitive-list @@ -2712,7 +2714,7 @@ Use `wl-subscribed-mailing-list'." folder)))) ;; Sticky folder exists. (wl-summary-sticky-buffer-name - (elmo-folder-name-internal folder)) + (elmo-folder-name-internal folder)) (concat wl-summary-buffer-name (symbol-name this-command)))) diff --git a/wl/wl-highlight.el b/wl/wl-highlight.el index df8462c..eb31e03 100644 --- a/wl/wl-highlight.el +++ b/wl/wl-highlight.el @@ -712,15 +712,6 @@ (defvar wl-highlight-folder-closed-regexp " *\\(\\[\\+\\]\\)") (defvar wl-highlight-folder-leaf-regexp "[ ]*\\([-%\\+]\\)\\(.*\\):.*$") -(defvar wl-highlight-summary-unread-regexp " *[0-9]+[^0-9]\\(!\\|U\\)") -(defvar wl-highlight-summary-important-regexp " *[0-9]+[^0-9]\\$") -(defvar wl-highlight-summary-new-regexp " *[0-9]+[^0-9]N") -(defvar wl-highlight-summary-deleted-regexp " *[0-9]+D") -(defvar wl-highlight-summary-refiled-regexp " *[0-9]+o") -(defvar wl-highlight-summary-copied-regexp " *[0-9]+O") -(defvar wl-highlight-summary-target-regexp " *[0-9]+\\*") -;;(defvar wl-highlight-summary-thread-top-regexp " *[0-9]+[^0-9][^0-9]../..\(.*\)..:.. \\[") - (defvar wl-highlight-citation-face-list '(wl-highlight-message-cited-text-1 wl-highlight-message-cited-text-2 @@ -791,12 +782,12 @@ (defun wl-highlight-summary-line-string (line mark temp-mark indent) (let (fsymbol) - (cond ((and (string= temp-mark "+") + (cond ((and (string= temp-mark wl-summary-score-over-mark) (member mark (list elmo-msgdb-unread-cached-mark elmo-msgdb-unread-uncached-mark elmo-msgdb-new-mark))) (setq fsymbol 'wl-highlight-summary-high-unread-face)) - ((and (string= temp-mark "-") + ((and (string= temp-mark wl-summary-score-below-mark) (member mark (list elmo-msgdb-unread-cached-mark elmo-msgdb-unread-uncached-mark elmo-msgdb-new-mark))) @@ -819,9 +810,9 @@ (setq fsymbol 'wl-highlight-summary-answered-face)) ((or (string= mark elmo-msgdb-important-mark)) (setq fsymbol 'wl-highlight-summary-important-face)) - ((string= temp-mark "-") + ((string= temp-mark wl-summary-score-below-mark) (setq fsymbol 'wl-highlight-summary-low-read-face)) - ((string= temp-mark "+") + ((string= temp-mark wl-summary-score-over-mark) (setq fsymbol 'wl-highlight-summary-high-read-face)) (t (if (zerop (length indent)) (setq fsymbol 'wl-highlight-summary-thread-top-face) @@ -859,12 +850,12 @@ dest t)))) (if (not fsymbol) (cond - ((and (string= temp-mark "+") + ((and (string= temp-mark wl-summary-score-over-mark) (member status-mark (list elmo-msgdb-unread-cached-mark elmo-msgdb-unread-uncached-mark elmo-msgdb-new-mark))) (setq fsymbol 'wl-highlight-summary-high-unread-face)) - ((and (string= temp-mark "-") + ((and (string= temp-mark wl-summary-score-below-mark) (member status-mark (list elmo-msgdb-unread-cached-mark elmo-msgdb-unread-uncached-mark elmo-msgdb-new-mark))) @@ -880,9 +871,9 @@ ((string= status-mark elmo-msgdb-important-mark) (setq fsymbol 'wl-highlight-summary-important-face)) ;; score mark - ((string= temp-mark "-") + ((string= temp-mark wl-summary-score-below-mark) (setq fsymbol 'wl-highlight-summary-low-read-face)) - ((string= temp-mark "+") + ((string= temp-mark wl-summary-score-over-mark) (setq fsymbol 'wl-highlight-summary-high-read-face)) ;; (t (if (null @@ -983,16 +974,7 @@ Faces used: wl-highlight-summary-deleted-face messages mark as deleted wl-highlight-summary-refiled-face messages mark as refiled wl-highlight-summary-copied-face messages mark as copied - wl-highlight-summary-new-face new messages - -Variables used: - wl-highlight-summary-unread-regexp matches unread messages - wl-highlight-summary-important-regexp matches important messages - wl-highlight-summary-deleted-regexp matches messages mark as deleted - wl-highlight-summary-refiled-regexp matches messages mark as refiled - wl-highlight-summary-copied-regexp matches messages mark as copied - wl-highlight-summary-new-regexp matches new messages -" + wl-highlight-summary-new-face new messages" (if (< end start) (let ((s start)) (setq start end end s))) (let (lines too-big gc-message e p hend i percent) diff --git a/wl/wl-mime.el b/wl/wl-mime.el index 9122401..ce47041 100644 --- a/wl/wl-mime.el +++ b/wl/wl-mime.el @@ -273,25 +273,26 @@ It calls following-method selected from variable (yes-or-no-p (format "Do you really want to delete part %s? " (wl-mime-node-id-to-string node-id)))) - (with-temp-buffer - (insert-buffer orig-buf) - (delete-region header-start body-end) - (goto-char header-start) - (insert "Content-Type: text/plain; charset=US-ASCII\n\n") - (insert "** This part has been removed by Wanderlust **\n\n") - (elmo-folder-append-buffer folder t)) - - (elmo-folder-append-messages - (wl-folder-get-elmo-folder wl-trash-folder) - folder (list number) nil) - (elmo-folder-delete-messages folder (list number)) - - (when (file-exists-p (elmo-cache-get-path msgid)) - (delete-file (elmo-cache-get-path msgid))) - - (mime-preview-quit) - (wl-summary-toggle-disp-msg 'off) - (wl-summary-sync nil "update"))))) + (when (with-temp-buffer + (insert-buffer orig-buf) + (delete-region header-start body-end) + (goto-char header-start) + (insert "Content-Type: text/plain; charset=US-ASCII\n\n") + (insert "** This part has been removed by Wanderlust **\n\n") + (elmo-folder-append-buffer folder t)) + + (elmo-folder-move-messages + folder (list number) + (wl-folder-get-elmo-folder wl-trash-folder)) + (when (and (elmo-cache-get-path msgid) + (file-exists-p (elmo-cache-get-path msgid))) + (delete-file (elmo-cache-get-path msgid))) + + (mime-preview-quit) + (wl-summary-delete-messages-on-buffer (list number)) + (wl-summary-toggle-disp-msg 'off) + (setq wl-message-buffer nil) + (wl-summary-sync nil "update")))))) (defun wl-message-decrypt-pgp-nonmime () "Decrypt PGP encrypted region" diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 93e607f..1c046a8 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -2528,15 +2528,15 @@ If ARG, without confirm." (if (and interactive wl-summary-recenter) (recenter (/ (- (window-height) 2) 2)))))) ;; set current entity-id - (if (and (not folder) - (setq entity - (wl-folder-search-entity-by-name (elmo-folder-name-internal - folder) - wl-folder-entity - 'folder))) - ;; entity-id is unknown. - (wl-folder-set-current-entity-id - (wl-folder-get-entity-id entity))) + (when (and folder + (setq entity + (wl-folder-search-entity-by-name + (elmo-folder-name-internal folder) + wl-folder-entity + 'folder))) + ;; entity-id is unknown. + (wl-folder-set-current-entity-id + (wl-folder-get-entity-id entity))) (when (and wl-summary-lazy-highlight wl-on-xemacs) (sit-for 0)) @@ -2927,7 +2927,8 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (while (not (eobp)) (when (string= (wl-summary-temp-mark) mark) (setq msglist (cons (wl-summary-message-number) msglist))) - (forward-line 1))))))) + (forward-line 1)) + (nreverse msglist)))))) (defun wl-summary-exec () (interactive) @@ -3045,11 +3046,13 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (wl-summary-folder-info-update) (wl-summary-set-message-modified) (run-hooks 'wl-summary-exec-hook) + ;; message buffer is not up-to-date (unless (and wl-message-buffer (eq (wl-summary-message-number) (with-current-buffer wl-message-buffer wl-message-buffer-cur-number))) - (wl-summary-toggle-disp-msg 'off)) + (wl-summary-toggle-disp-msg 'off) + (setq wl-message-buffer nil)) (set-buffer-modified-p nil) (message (concat "Executing...done" (if (> refile-failures 0) @@ -3078,10 +3081,7 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (format "Erase \"%s\" without moving it to trash? " (truncate-string subject 30))) (wl-summary-unmark msg-num) - (elmo-folder-delete-messages wl-summary-buffer-elmo-folder - (list msg-num)) - (wl-summary-delete-messages-on-buffer (list msg-num)) - (save-excursion (wl-summary-sync nil "update")))))) + (wl-summary-erase-subr (list msg-num)))))) (message "Read-only folder."))) (defun wl-summary-target-mark-erase () @@ -3091,14 +3091,21 @@ If optional argument NUMBER is specified, mark message specified by NUMBER." (message "No marked message.") (when (yes-or-no-p "Erase all marked messages without moving them to trash? ") - (elmo-folder-delete-messages wl-summary-buffer-elmo-folder - wl-summary-buffer-target-mark-list) - (wl-summary-delete-messages-on-buffer - wl-summary-buffer-target-mark-list) - (setq wl-summary-buffer-target-mark-list nil) - (save-excursion (wl-summary-sync nil "update")))) + (wl-summary-erase-subr wl-summary-buffer-target-mark-list) + (setq wl-summary-buffer-target-mark-list nil))) (message "Read-only folder."))) +(defun wl-summary-erase-subr (msgs) + (elmo-folder-move-messages wl-summary-buffer-elmo-folder msgs 'null) + (wl-summary-delete-messages-on-buffer msgs) + ;; message buffer is not up-to-date + (unless (and wl-message-buffer + (eq (wl-summary-message-number) + (with-current-buffer wl-message-buffer + wl-message-buffer-cur-number))) + (wl-summary-toggle-disp-msg 'off) + (setq wl-message-buffer nil))) + (defun wl-summary-read-folder (default &optional purpose ignore-error no-create init) (let ((fld (completing-read @@ -4139,7 +4146,7 @@ If ARG, exit virtual folder." (defun wl-summary-line-list-info () (let ((list-info (wl-summary-get-list-info wl-message-entity))) (if (car list-info) - (format (if (cdr list-info) "(%s %05d)" "(%s)") + (format (if (cdr list-info) "(%s %05.0f)" "(%s)") (car list-info) (cdr list-info)) ""))) @@ -4607,6 +4614,7 @@ Return t if message exists." (save-excursion (set-buffer summary-buf) (wl-summary-delete-all-temp-marks))) + (wl-draft-reply-position wl-draft-reply-default-position) (run-hooks 'wl-mail-setup-hook))) (defun wl-summary-reply-with-citation (&optional arg) @@ -4614,6 +4622,7 @@ Return t if message exists." (when (wl-summary-reply arg t) (goto-char (point-max)) (wl-draft-yank-original) + (wl-draft-reply-position wl-draft-reply-default-position) (run-hooks 'wl-mail-setup-hook))) (defun wl-summary-jump-to-msg-by-message-id (&optional id) @@ -4820,6 +4829,7 @@ Reply to author if invoked with ARG." (goto-char (point-min)) (when (setq mes-buf (wl-message-get-original-buffer)) (wl-draft-reply mes-buf arg summary-buf number) + (wl-draft-reply-position wl-draft-reply-default-position) (unless without-setup-hook (run-hooks 'wl-mail-setup-hook))) t))) diff --git a/wl/wl-thread.el b/wl/wl-thread.el index 462c28c..08882e7 100644 --- a/wl/wl-thread.el +++ b/wl/wl-thread.el @@ -119,7 +119,8 @@ (defun wl-thread-save-top-list (dir) (let ((top-file (expand-file-name wl-thread-entity-list-file dir)) (entity wl-thread-entity-list) - (tmp-buffer (get-buffer-create " *wl-thread-save-top-list*"))) + (tmp-buffer (get-buffer-create " *wl-thread-save-top-list*")) + print-length) (save-excursion (set-buffer tmp-buffer) (erase-buffer) @@ -132,7 +133,8 @@ (defun wl-thread-save-entities (dir) (let ((top-file (expand-file-name wl-thread-entity-file dir)) (entities wl-thread-entities) - (tmp-buffer (get-buffer-create " *wl-thread-save-entities*"))) + (tmp-buffer (get-buffer-create " *wl-thread-save-entities*")) + print-length print-level) (save-excursion (set-buffer tmp-buffer) (erase-buffer) diff --git a/wl/wl-vars.el b/wl/wl-vars.el index a4c9a17..1d6027a 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -182,7 +182,7 @@ If you don't have multiple e-mail addresses, you don't have to set this." :group 'wl-summary) (defcustom wl-summary-default-view-alist nil - "An alist of folder name and summary default view. + "An alist of regexp for folder name and summary default view. If no match, `wl-summary-default-view' is used." :type '(repeat (cons (regexp :tag "Folder Regexp") (choice (const :tag "Thread" thread) @@ -201,7 +201,7 @@ If no match, `wl-summary-default-view' is used." (?a (length wl-summary-buffer-number-list))) "An alist of format specifications that can appear in summary mode-lines. Each element is a list of following: -\(SPEC STRING-EXP\) +\(SPEC STRING-EXP) SPEC is a character for format specification. STRING-EXP is an expression to get string to insert.") @@ -248,7 +248,7 @@ which are replaced by the given information: (?@ (wl-summary-line-attached))) "An alist of format specifications that can appear in summary lines. Each element is a list of following: -\(SPEC STRING-EXP\) +\(SPEC STRING-EXP) SPEC is a character for format specification. STRING-EXP is an expression to get string to insert.") @@ -481,7 +481,7 @@ If nil, don't authenticate." "*POP3 user name to send mail using POP-before-SMTP. If nil, `elmo-pop3-default-user' is used. To use POP-before-SMTP, -\(setq wl-draft-send-mail-function 'wl-draft-send-mail-with-pop-before-smtp\)" +\(setq wl-draft-send-mail-function 'wl-draft-send-mail-with-pop-before-smtp)" :type '(choice (const :tag "none" nil) string) :group 'wl @@ -745,30 +745,11 @@ Prepared candidates are 'wl-draft-send-mail-with-smtp, :group 'wl-draft) (defcustom wl-draft-reply-with-argument-list - '(("Reply-To" . (("Reply-To") nil nil)) - ("Mail-Reply-To" . (("Mail-Reply-To") nil nil)) - ("From" . (("From") nil nil))) + '(("From" . (("Reply-To" "Mail-Reply-To" "From") + ("Mail-Followup-To" "To" "Cc") + ("Followup-To" "Newsgroups")))) "Alist of cons cell of -('field-name' . ('fields for To' 'fields for Cc' 'fields for Newsgroups')) -'field-name' is a string. -'fields for ***' is a list of strings. -If car of each cons cell exists in original message, -cdr of each cons cell is used for draft message. -Default is for 'reply-to-author'." - :type '(repeat (cons (choice (string :tag "Field Name") - (repeat (string :tag "Field Name"))) - (list (repeat :tag "Fields For To" string) - (repeat :tag "Fields For Cc" string) - (repeat :tag "Fields For Newsgroups" string)))) - :group 'wl-draft) - -(defcustom wl-draft-reply-without-argument-list - '(("Followup-To" . (nil nil ("Followup-To"))) - ("Mail-Followup-To" . (("Mail-Followup-To") nil ("Newsgroups"))) - ("Reply-To" . (("Reply-To") ("To" "Cc" "From") ("Newsgroups"))) - ("From" . (("From") ("To" "Cc") ("Newsgroups")))) - "Alist of cons cell of -('field-name' . ('fields for To' 'fields for Cc' 'fields for Newsgroups')) +\('field-name' . ('fields for To' 'fields for Cc' 'fields for Newsgroups')) 'field-name' is a string. 'fields for ***' is a list of strings. If car of each cons cell exists in original message, @@ -781,35 +762,20 @@ Default is for 'reply-to-all'." (repeat :tag "Fields For Newsgroups" string)))) :group 'wl-draft) -(defcustom wl-draft-reply-myself-with-argument-list - '(("Followup-To" . (("To") ("Cc") ("Followup-To"))) - ("Newsgroups" . (("To") ("Cc") ("Newsgroups"))) - ("From" . (("To") ("Cc") nil))) - "Alist of cons cell of -('field-name' . ('fields for To' 'fields for Cc' 'fields for Newsgroups')) -'field-name' is a string. -'fields for ***' is a list of strings. -If car of each cons cell exists in original message, -cdr of each cons cell is used for draft message. -Default is for 'reply-to-me'." - :type '(repeat (cons (choice (string :tag "Field Name") - (repeat (string :tag "Field Name"))) - (list (repeat :tag "Fields For To" string) - (repeat :tag "Fields For Cc" string) - (repeat :tag "Fields For Newsgroups" string)))) - :group 'wl-draft) - -(defcustom wl-draft-reply-myself-without-argument-list - '(("Followup-To" . (("To") ("Cc") ("Followup-To"))) - ("Newsgroups" . (("To") ("Cc") ("Newsgroups"))) - ("From" . (("To") ("Cc") nil))) +(defcustom wl-draft-reply-without-argument-list + '(("Followup-To" . (("Mail-Followup-To" "Mail-Reply-To" "Reply-To") nil ("Followup-To"))) + ("Mail-Followup-To" . (("Mail-Followup-To") nil nil)) + ("Newsgroups" . (("Mail-Reply-To" "Reply-To" "To") ("Cc") ("Newsgroups"))) + ("Mail-Reply-To" . (("Mail-Reply-To" "Reply-To") ("To" "Cc") nil)) + ("Reply-To" . (("Reply-To") ("To" "Cc") nil)) + (wl-draft-self-reply-p . (("To") ("Cc") nil)) + ("From" . (("From") ("To" "Cc") nil))) "Alist of cons cell of -('field-name' . ('fields for To' 'fields for Cc' 'fields for Newsgroups')) +\('field-name' . ('fields for To' 'fields for Cc' 'fields for Newsgroups')) 'field-name' is a string. 'fields for ***' is a list of strings. If car of each cons cell exists in original message, -cdr of each cons cell is used for draft message. -Default is for 'followup-to-me'." +cdr of each cons cell is used for draft message." :type '(repeat (cons (choice (string :tag "Field Name") (repeat (string :tag "Field Name"))) (list (repeat :tag "Fields For To" string) @@ -924,7 +890,7 @@ Default is for 'followup-to-me'." (defcustom wl-summary-fix-timezone nil "*Time zone of the date string in summary mode. If nil, it is adjust to the default time zone information -\(system's default time zone or environment variable TZ\)." +\(system's default time zone or environment variable TZ)." :type '(choice (const :tag "Default time zone" nil) string) :group 'wl-summary) @@ -1230,6 +1196,29 @@ If it is a function, it is called with the draft buffer as an argument." (sexp :tag "Use Function")) :group 'wl-draft) +(defcustom wl-draft-reply-default-position 'body + "Begining position of reply buffer. +'body means the top of body. +'bottom means the bottom of body. +'top means the top of header. +\"To\", \"Newsgroups\", \"Subject\" means the position of the header field. +You can also set it to a list of setting. +" + :type '(choice (repeat + (choice + (const :tag "Top of body" body) + (const :tag "Bottom of body" bottom) + (const :tag "Top of header" top) + (const "To") + (const "Newsgroups") + (const "Subject") + (string :tag "Header Name"))) + (const "To") + (const "Newsgroups") + (const "Subject") + (string :tag "Header Name")) + :group 'wl-draft) + (defcustom wl-draft-queue-save-variables '(wl-envelope-from wl-from wl-smtp-posting-server wl-smtp-posting-user wl-smtp-posting-port @@ -1359,7 +1348,11 @@ Allowed situations are: :type '(repeat (cons (string :tag "Realname") (string :tag "Petname"))) :group 'wl-folder) -(defcustom wl-summary-weekday-name-lang "ja" +(defcustom wl-summary-weekday-name-lang + (if (and (boundp 'current-language-environment) + (string-equal "Japanese" + (symbol-value 'current-language-environment))) + "ja" "en") "*Language to display week day." :type '(choice (const "ja") (const "en") @@ -1369,7 +1362,7 @@ Allowed situations are: :group 'wl-summary :group 'wl-pref) -(defcustom wl-message-id-use-wl-from nil +(defcustom wl-message-id-use-wl-from t "*Use `wl-from' for domain part of Message-ID if non-nil." :type 'boolean :group 'wl-pref) @@ -1405,7 +1398,7 @@ which appear just before @." (?n wl-message-buffer-cur-number)) "An alist of format specifications for message buffer's mode-lines. Each element is a list of following: -\(SPEC STRING-EXP\) +\(SPEC STRING-EXP) SPEC is a character for format specification. STRING-EXP is an expression to get string to insert.") @@ -1586,8 +1579,9 @@ with wl-highlight-folder-many-face." :group 'wl-pref) (defcustom wl-summary-max-thread-depth 30 - "*If thread depth is larger than this value, don't treat it as a thread." - :type 'integer + "*If thread depth of the message is larger than this value, divide it." + :type '(choice (const :tag "Unlimited" nil) + integer) :group 'wl-summary :group 'wl-pref) @@ -1903,7 +1897,7 @@ See also variable `wl-summary-next-no-unread-command'." :group 'wl-pref :group 'wl-setting) -(defcustom wl-message-buffer-prefetch-folder-type-list t +(defcustom wl-message-buffer-prefetch-folder-type-list '(imap4 nntp) "*All folder types that match this list prefetch next message, and reserved buffer cache." :type `(choice (const :tag "all" t) @@ -1929,12 +1923,12 @@ e.x. :type '(repeat (regexp :tag "Folder Regexp")) :group 'wl-pref) -(defcustom wl-message-buffer-prefetch-depth 3 +(defcustom wl-message-buffer-prefetch-depth 1 "*Depth of buffer prefetch in summary mode." :type 'integer :group 'wl-pref) -(defcustom wl-message-buffer-prefetch-idle-time 0.2 +(defcustom wl-message-buffer-prefetch-idle-time 1 "*Idle time of buffer prefetch." :type 'number :group 'wl-pref) @@ -2001,7 +1995,7 @@ e.x. ("^-han\\." . (2 "+" "+" "|" "-" " "))) "Thread indent set alist. If no match, following indent set is used. -(wl-thread-indent-level +\(wl-thread-indent-level wl-thread-have-younger-brother-str wl-thread-youngest-child-str wl-thread-vertical-str @@ -2064,7 +2058,7 @@ If TYPE is nil, do nothing for duplicated messages." :group 'wl-folder) (defcustom wl-folder-move-cur-folder nil - "*Non-nil, move to current folder on folder-mode when goto folder." + "*Non-nil, move cursor to current folder on folder buffer when goto folder." :type 'boolean :group 'wl-folder) @@ -2634,6 +2628,12 @@ a symbol `bitmap', `xbm' or `xpm' in order to force the image format." ;;;; Obsolete variables. +;; 2002-12-25 +(elmo-define-obsolete-variable 'wl-draft-reply-myself-with-argument-list + 'wl-draft-reply-with-argument-list) +(elmo-define-obsolete-variable 'wl-draft-reply-myself-without-argument-list + 'wl-draft-reply-without-argument-list) + ;; 2001-12-11: *-dir -> *-directory (elmo-define-obsolete-variable 'wl-icon-dir 'wl-icon-directory) diff --git a/wl/wl.el b/wl/wl.el index d2194c4..c4ca68d 100644 --- a/wl/wl.el +++ b/wl/wl.el @@ -58,6 +58,7 @@ (require 'wl-summary) (require 'wl-thread) (require 'wl-address) +(require 'wl-news) (wl-draft-mode-setup) (require 'wl-draft) @@ -696,6 +697,7 @@ Entering Plugged mode calls the value of `wl-plugged-mode-hook'." (symbol-value 'wl-summary-subject-filter-function)) (setq elmo-no-from wl-summary-no-from-message) (setq elmo-no-subject wl-summary-no-subject-message) + (wl-news-check) (setq wl-init t) ;; This hook may contain the functions `wl-plugged-init-icons' and ;; `wl-biff-init-icons' for reasons of system internal to accord @@ -703,7 +705,7 @@ Entering Plugged mode calls the value of `wl-plugged-mode-hook'." (run-hooks 'wl-init-hook))) (defun wl-check-environment (no-check-folder) - (unless wl-from (error "Please set `wl-from' to your mail address.")) + (unless wl-from (error "Please set `wl-from' to your mail address")) ;; Message-ID (when wl-insert-message-id (let ((message-id (funcall wl-message-id-function)) @@ -711,10 +713,10 @@ Entering Plugged mode calls the value of `wl-plugged-mode-hook'." (unless (string-match "^<\\([^@]*\\)@\\([^@]*\\)>$" message-id) (cond ((string-match "@" wl-message-id-domain) - (error "Please remove `@' from `wl-message-id-domain'.")) + (error "Please remove `@' from `wl-message-id-domain'")) (t (error - "Check around `wl-message-id-function' to get valid Message-ID string.")))) + "Check around `wl-message-id-function' to get valid Message-ID string")))) (setq domain (match-string 2 message-id)) (if (or (not (string-match "[^.]\\.[^.]" domain)) (string= domain "localhost.localdomain")) @@ -776,7 +778,7 @@ Entering Plugged mode calls the value of `wl-plugged-mode-hook'." (defun wl-check-variables-2 () (if (< wl-message-buffer-cache-size 1) - (error "`wl-message-buffer-cache-size' must be larger than 0.")) + (error "`wl-message-buffer-cache-size' must be larger than 0")) (when wl-message-buffer-prefetch-depth (if (not (< wl-message-buffer-prefetch-depth wl-message-buffer-cache-size))