+2003-01-17 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * 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 <yoichi@eken.phys.nagoya-u.ac.jp>
+
+ * WL-MK (wl-info-lang): Skip "ja" for non-mule.
+ (wl-news-lang): Ditto.
+
+2002-12-28 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * WL-MK (test-wl, check-wl): Load wl-news.el.in.
+
+2002-12-27 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * INSTALL, INSTALL.ja: Updated recommended version of FLIM to 1.14.5.
+
+2002-12-21 Yoichi NAKAYAMA <yoichi@eken.phys.nagoya-u.ac.jp>
+
+ * WL-MK (make-wl-news): Don't add wl-news-lang setting into
+ wl-news.el here.
+
+2002-12-20 Kenichi OKADA <okada@opaopa.org>
+
+ * WL-MK (make-wl-news): Fix coding system.
+
+2002-12-20 Kenichi OKADA <okada@opaopa.org>
+
+ * WL-MK (wl-news-parse-news-subr): Decide
+ coding-system.
+
+2002-12-20 Kenichi OKADA <okada@opaopa.org>
+
+ * 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 <okada@opaopa.org>
+
+ * WL-CFG (wl-news-lang): New variable.
+
+2002-12-20 Kenichi OKADA <okada@opaopa.org>
+
+ * 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 <teranisi@gohome.org>
* 2.10.0 - "Venus"
(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
(a) XEmacs 21.1 \e$B0J9_\e(B
- APEL 10.4, FLIM 1.14.4, SEMI 1.14.5
+ APEL 10.4, FLIM 1.14.5, SEMI 1.14.5
\e$B2DG=$J$i$P\e(B XEmacs \e$B$N%Q%C%1!<%8$H$7$F%$%s%9%H!<%k$9$k$3$H$r$*4+$a$7$^$9!#\e(B
(b) Emacs 20.4 \e$B0J9_\e(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\e$B!A\e(B20.3
$(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)
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
** 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.
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.
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.
** 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.
** 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.
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.
*** 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.
Emacsen on character based terminal also display suitable DEMO.
\f
-* 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.
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
Wanderlust NEWS (\e$BF|K\8lHG\e(B) -- User-visible changes in Wanderlust.
+** \e$BA0$K;H$C$F$$$?$b$N$h$j?7$7$$\e(B Wanderlust \e$B$r5/F0$9$k$H\e(B NEWS(.ja) \e$B$NFbMF$r\e(B
+ \e$BI=<($7$^$9!#\e(B
+
+** wl-draft-reply-*-list \e$B$N=i4|CM$,JQ99$5$l$^$7$?!#\e(B
+ \e$B0JA0$N@_Dj$O!"\e(Bsamples/ja/dot.wl \e$B$r;2>H$7$F2<$5$$!#\e(B
+
+** wl-draft-reply-myself-*-list \e$B$OGQ;_$5$l!"\e(Bwl-draft-reply-*-list \e$B$KE}9g\e(B
+ \e$B$5$l$^$7$?!#\e(B
+
** \e$B%I%i%U%H%P%C%U%!%&%#%s%I%&$NG[CV$N;XDj$N;EJ}$,JQ99$5$l$^$7$?!#\e(B
wl-draft-buffer-style \e$B$H\e(B wl-draft-reply-buffer-style \e$B$K\e(B keep,full,split
\e$B$N$$$:$l$+$r;XDj$7$^$9!#\e(B
+** non-MIME PGP \e$B%a%C%;!<%8$N8!>Z!"I|9f2=$N$?$a$N%3%^%s%I$,DI2C$5$l$^$7$?!#\e(B
+ \e$B%a%C%;!<%8%P%C%U%!$K$*$$$F\e(B C-c:v, C-c:d \e$B$G$=$l$>$l8!>Z!"I|9f2=$7$^$9!#\e(B
+
* 2.8.1 \e$B$+$i\e(B 2.10.0 \e$B$X$NJQ99E@\e(B
** \e$B%5%^%j9T$NI=<(7A<0$rJQ99$G$-$k$h$&$K$J$j$^$7$?!#\e(B
** \e$B%"%/%;%9%0%k!<%W%U%)%k%@$N2~L>$,=PMh$k$h$&$K$J$j$^$7$?!#\e(B
+** \e$B?75,%5%^%j$KBP$9$k%9%l%C%II=<($N\e(B ON/OFF \e$B$r;XDj$G$-$k$h$&$K$J$j$^$7$?!#\e(B
+ wl-summary-default-view, wl-summary-default-view-alist \e$B$r@_Dj$7$F2<$5$$!#\e(B
+
** \e$B%9%F%#%C%-!<%5%^%j$r\e(B q \e$B$d\e(B g \e$B$GH4$1$k:]$K!"0l;~E*%^!<%/$rJ];}$9$k$h$&$K\e(B
\e$B$J$j$^$7$?!#\e(B
\e$B%a%C%;!<%8%P%C%U%!$G\e(B "D" \e$B$K%P%$%s%I$5$l$F$$$^$9!#\e(B
** \e$B%K%e!<%95-;v$rEj9F$9$k%5!<%P$r4JC1$K@_Dj$G$-$k$h$&$K$J$j$^$7$?!#\e(B
- info \e$B$NNc$K=,$C$F\e(B wl-nntp-posting-config-alist \e$B$r@_Dj$7$F2<$5$$!#\e(B
+ Info \e$B$NNc$K=,$C$F\e(B wl-nntp-posting-config-alist \e$B$r@_Dj$7$F2<$5$$!#\e(B
** \e$BJQ?t\e(B wl-draft-reply-with-argument-list \e$BEy$G!"4X?t$NJV$jCM$+$i08@h$r\e(B
\e$B7h$a$i$l$k$h$&$K$J$j$^$7$?!#\e(B
"$" \e$B%^!<%/$NIU$$$?%a%C%;!<%8$r8+D>$7$?$$>l9g$O\e(B 'mark \e$B%U%)%k%@$r;2>H$7$F\e(B
\e$B$/$@$5$$!#\e(B
-* 2.6.1 \e$B$O\e(B 2.6.0 \e$B$N=$@5HG$G$9!#\e(B
+* 2.6.0 \e$B$+$i\e(B 2.6.1 \e$B$X$NJQ99E@\e(B
+ 2.6.1 \e$B$O\e(B 2.6.0 \e$B$N=$@5HG$G$9!#\e(B
** Emacs 21 \e$B$G\e(B Recursive load... \e$B$H=P$kIT6q9g$,=$@5$5$l$^$7$?!#\e(B
** \e$BB?$/$N%P%0%U%#%C%/%9\e(B
-* 2.4.1 \e$B$O\e(B 2.4.0 \e$B$N=$@5HG$G$9!#\e(B
+* 2.4.0 \e$B$+$i\e(B 2.4.1 \e$B$X$NJQ99E@\e(B
+ 2.4.1 \e$B$O\e(B 2.4.0 \e$B$N=$@5HG$G$9!#\e(B
** FLIM 1.14.x \e$B>e$G$bF0:n$9$k$h$&$K$J$j$^$7$?!#\e(B
(setq elmo-default-imap4-authenticate-type 'clear)
\e$B$KJQ99$9$kI,MW$,$"$j$^$9!#\e(B
-* 1.1.1 \e$B$+$i\e(B version 2.4.0 \e$B$X$NJQ99E@\e(B
+* 1.1.1 \e$B$+$i\e(B 2.4.0 \e$B$X$NJQ99E@\e(B
** \e$B%P!<%8%g%sHV9f\e(B
\e$B%P!<%8%g%sHV9f$NIU$1J}$,JQ$o$j$^$7$?!#\e(B
*** \e$B%U%#%k%?%U%)%k%@$KJ#;($J>r7o;XDj$r;XDj$G$-$k$h$&$K$J$j$^$7$?!#\e(B
AND \e$B>r7o!"\e(BOR \e$B>r7o!"H]Dj>r7o!"$*$h$S$=$l$i$NAH9g$;$r;XDj$G$-$^$9!#\e(B
\e$B$3$l$K$H$b$J$$!">r7o;XDjItJ,$N%7%s%?%C%/%9$,JQ99$5$l$^$7$?!#\e(B
-\e$B$/$o$7$/$O\e(B info \e$B$r8fMw2<$5$$!#\e(B
+\e$B$/$o$7$/$O\e(B Info \e$B$r8fMw2<$5$$!#\e(B
\e$BCm0U!'\e(B1.1.1 \e$B$+$i0\9T$5$l$kJ}$X\e(B
\e$B>e5-JQ99$KH<$$!"%U%#%k%?%U%)%k%@$N\e(B msgdb \e$B$NCV$->l=j$,JQ$o$j$^$7$?!#\e(B
\e$B$J$j$^$7$?!#\e(B
\f
-* 1.1.1 \e$B$O\e(B 1.1.0 \e$B$N%P%0=$@5HG$G$9!#$$$/$D$+$N:Y$+$$=$@5$,2C$o$C$F$$$^$9!#\e(B
+* 1.1.0 \e$B$+$i\e(B 1.1.1 \e$B$X$NJQ99E@\e(B
+ 1.1.1 \e$B$O\e(B 1.1.0 \e$B$N%P%0=$@5HG$G$9!#$$$/$D$+$N:Y$+$$=$@5$,2C$o$C$F$$$^$9!#\e(B
** CVS \e$B%5!<%P>e$G$N3+H/$,;O$a$i$l$^$7$?!#\e(B
progress gauge \e$B$NI=<(5!G=$r$b$D\e(B Emacs \e$B$G$O!"=hM}$N?JD=$,\e(B progress gauge \e$B$K\e(B
\e$BI=<($5$l$k$h$&$K$J$j$^$7$?!#\e(B
-* 1.0.3 \e$B$+$i\e(B version 1.1.0 \e$B$X$NJQ99E@\e(B
+* 1.0.3 \e$B$+$i\e(B 1.1.0 \e$B$X$NJQ99E@\e(B
** \e$B%$%s%9%H!<%k\e(B
;; 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"
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 '(
(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.]* \e$B$+$i\e(B \\([0-9.]*\\) \e$B$X$NJQ99E@\e(B")))
+(defconst wl-news-filename "wl-news.el")
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
\f
(require 'cl)
(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)))
(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)))
(defun compile-wl-package ()
(config-wl-package)
+ (make-wl-news)
(mapcar
'(lambda (x)
(compile-elisp-modules (cdr x) (car x)))
;; 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)
(wl-texinfo-install))
\f
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; 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 "^\\(\\* \\|\f\\)" 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))
+
+
+\f
;;; ToDo
;;; * MORE refine code (^_^;
% 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
%
% 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.
% 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]:}
\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{}
\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
}
\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}}
\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{!`}
% @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
% _ 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}%
}}
%
\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}
\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.
%
\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
\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{??}%
\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.
%
\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
\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
\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
%% 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.
% 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.
\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
\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.}
% 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.
%
% 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.
%
% 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}
}
% 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
% @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}}
% @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}}
\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
\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
{\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)?
\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
\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.
\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<toks register> to achieve this: TeX expands \the<toks> only once,
-% simply yielding the contents of <toks register>. (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<toks register> to achieve this: TeX expands \the<toks> only once,
+ % simply yielding the contents of <toks register>. (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.
\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}
% 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
\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
%
\newskip\lskip\newskip\rskip
-\long\def\cartouche{%
+\def\cartouche{%
\begingroup
\lskip=\leftskip \rskip=\rightskip
\leftskip=0pt\rightskip=0pt %we want these *outside*.
% @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.
%
\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
\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
% 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.
% 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
\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}%
}
% Active &'s sneak into the index arguments, so make sure it's defined.
{
- \catcode`& = 13
+ \catcode`& = \active
\global\let& = \ampnr
}
\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%
}
\def\defvarparsebody #1#2#3{%
\parsebodycommon{#1}{#2}{#3}%
\def#2{\defxbodycommon \spacesplit#3}%
- \catcode61=\active %
+ \catcode\equalChar=\active
\begingroup\obeylines
\spacesplit#3%
}
\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
\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})
\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})
% 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
\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
\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...
\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
\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
}
% 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}%
% 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
\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
% <parameter list> is #, then the preceding argument is delimited by
% an opening brace, and that opening brace is not consumed.
\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}%
\ifpdf
\leavevmode
\getfilename{#4}%
- {\normalturnoffactive
+ {\turnoffactive \otherbackslash
\ifnum\filenamelength>0
\startlink attr{/Border [0 0 0]}%
goto file{\the\filename.pdf} name{#1}%
% 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}{}}%
% [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
\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
\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 ^
% \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
\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
\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
% 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
% \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
\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
\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
\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
\hfuzz = 1pt
\contentsrightmargin = 0pt
\defbodyindent = .5cm
- \smallenvironments
}}
% Use @afourpaper to print on European A4 paper.
\contentsrightmargin = 0pt
\defbodyindent = 2mm
\tableindent = 12mm
- %
- \smallenvironments
}}
% A specific text layout, 24x15cm overall, intended for A4 paper.
\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}}
\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
\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.
-\def\versionnumber{2.11.0}
+\def\versionnumber{2.11.1}
-@set VERSION 2.11.0
+@set VERSION 2.11.1
\e$B?d>)$5$l$k\e(B APEL, FLIM, SEMI \e$B$N%P!<%8%g%s$NAH9g$;$O!"0J2<$NDL$j$G$9!#\e(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
\e$B$=$NB>!"\e(BFLIM, SEMI \e$B$K$O$$$m$$$m$JJQ7A%P!<%8%g%s$,B8:_$7$^$9$,!"\e(B
@item T
@kindex T (Summary)
@findex wl-summary-toggle-thread
-\e$B%9%l%C%II=<($r%H%0%k$7$^$9!#\e(B
-\e$B8=:_$N%9%l%C%II=<(>uBV$O%b!<%I%i%$%s$KI=<($5$l$^$9!%\e(B
-@samp{@{S@}} \e$B$O%9%l%C%I!&%*%U\e(B(Sequence)\e$B$N>uBV!$\e(B
-@samp{@{T@}} \e$B$O%9%l%C%I!&%*%s\e(B(Thread)\e$B$N>uBV$r<($7$^$9!%\e(B
+\e$B%9%l%C%II=<($r%H%0%k$7$^$9!#$=$N>uBV$O\e(B Wanderlust \e$B$r=*N;$7$F$bJ]B8$5$l\e(B
+\e$B$^$9!#?75,$K:n@.$5$l$?%5%^%j$KBP$7$F$N%G%U%)%k%H$N>uBV$O\e(B
+@code{wl-summary-default-view} \e$B$d\e(B @code{wl-summary-default-view-alist}
+\e$B$G;XDj$9$k$3$H$,$G$-$^$9!#\e(B
+\e$B8=:_$N%9%l%C%II=<(>uBV$O%b!<%I%i%$%s$KI=<($5$l$^$9!#\e(B
+@samp{@{S@}} \e$B$O%9%l%C%I!&%*%U\e(B(Sequence)\e$B$N>uBV!"\e(B
+@samp{@{T@}} \e$B$O%9%l%C%I!&%*%s\e(B(Thread)\e$B$N>uBV$r<($7$^$9!#\e(B
(@code{wl-summary-toggle-thread})
@item l
@item wl-summary-weekday-name-lang
@vindex wl-summary-weekday-name-lang
-\e$B=i4|@_Dj$O\e(B @samp{ja}\e$B!#%5%^%j$NMKF|I=<($N8@8l$r;XDj$7$^$9!#\e(B@samp{en} \e$B$J$i\e(B
+\e$B%5%^%j$NMKF|I=<($N8@8l$r;XDj$7$^$9!#\e(B@samp{en} \e$B$J$i\e(B
\e$B1Q8l!"\e(B@samp{fr} \e$B$J$i%U%i%s%98l!"\e(B@samp{de} \e$B$J$i%I%$%D8l$H$J$j$^$9!#\e(B
\e$BCM$rJQ99$7$?8e$K$O!"%5%^%j$r\e(B rescan \e$B$7$F2<$5$$!#\e(B
@item wl-message-window-size
@vindex wl-message-window-size
\e$B=i4|@_Dj$O\e(B '(1 . 4)\e$B!#\e(B
-\e$B%5%^%j$rI=<($9$k%&%#%s%I%&$H%a%C%;!<%8K\BN$rI=<($9$k%&%#%s%I%&$NHf$r\e(B cons \e$B$G;XDj$7$^$9!#\e(Bcar:cdr \e$B$,\e(B \e$B%5%^%j\e(B:\e$B%a%C%;!<%8\e(B \e$B$G$9!#\e(B
+\e$B%5%^%j$rI=<($9$k%&%#%s%I%&$H%a%C%;!<%8K\BN$rI=<($9$k%&%#%s%I%&$NHf$r\e(B
+cons \e$B$G;XDj$7$^$9!#\e(Bcar:cdr \e$B$,\e(B \e$B%5%^%j\e(B:\e$B%a%C%;!<%8\e(B \e$B$G$9!#\e(B
+
+@item wl-summary-from-function
+@vindex wl-summary-from-function
+\e$B%5%^%j$N:9=P?MI=<($N@07A$K;H$&4X?t$r;XDj$7$^$9!#\e(B
+\e$B=i4|@_Dj$O\e(B @code{wl-summary-default-from} \e$B$G$9!#\e(B
@item wl-summary-no-from-message
@vindex wl-summary-no-from-message
\e$B=i4|@_Dj$O\e(B @samp{nobody@@nowhere?}\e$B!#\e(B
\e$B%a%C%;!<%8$K\e(B @samp{From:} \e$B$,L5$+$C$?>l9g$K%5%^%j$KI=<($9$kJ8;zNs$G$9!#\e(B
+@item wl-summary-subject-function
+@vindex wl-summary-subject-function
+\e$B%5%^%j$N%5%V%8%'%/%HI=<($N@07A$K;H$&4X?t$r;XDj$7$^$9!#\e(B
+\e$B=i4|@_Dj$O\e(B @code{wl-summary-default-subject} \e$B$G!"%5%V%8%'%/%H@hF,$N\e(B
+\e$B%j%9%HL>$J$IItJ,$r%+%C%H$7$^$9!#\e(B
+\e$B%5%V%8%'%/%H$r$=$N$^$^I=<($9$k$K$O0J2<$N$h$&$K@_Dj$7$^$9!#\e(B
+
+@lisp
+(setq wl-summary-subject-function 'identity)
+@end lisp
+
@item wl-summary-no-subject-message
@vindex wl-summary-no-subject-message
\e$B=i4|@_Dj$O\e(B @samp{(WL:No Subject in original.)}\e$B!#%a%C%;!<%8$K\e(B
@samp{Subject:} \e$B$,L5$+$C$?>l9g$K%5%^%j$KI=<($9$kJ8;zNs$G$9!#\e(B
+@item wl-summary-default-view
+@vindex wl-summary-default-view
+\e$B=i4|@_Dj$O\e(B @code{'thread}\e$B!#\e(B
+\e$B?75,$K:n@.$5$l$?%5%^%j$N>uBV$r%9%l%C%II=<($J$i\e(B @code{'thread}\e$B!"\e(B
+\e$BHV9f=g$J$i\e(B @code{'sequence} \e$B$N$$$:$l$+$G;XDj$7$^$9!#\e(B
+
@item wl-summary-use-frame
@vindex wl-summary-use-frame
\e$B=i4|@_Dj$O\e(B @code{nil}\e$B!#\e(B
\e$BCM$r\e(B @code{nil} \e$B$K$9$k$H$-$O!"\e(B@code{wl-summary-width} \e$B$b\e(B @code{nil} \e$B$K@_Dj\e(B
\e$B$9$k$H$h$$$G$7$g$&!#\e(B
+@item wl-summary-max-thread-depth
+@vindex wl-summary-max-thread-depth
+\e$B=i4|@_Dj$O\e(B 30\e$B!#@_Dj$5$l$?CM0J>e$N?<$5$N%9%l%C%I$rJ,3d$7$^$9!#\e(B
+
@item wl-summary-recenter
@vindex wl-summary-recenter
\e$B=i4|@_Dj$O\e(B @code{t}\e$B!#\e(BNon-nil \e$B$J$i$PI=<($7$?$H$-$KI=<(Cf$N%a%C%;!<%8$N%5\e(B
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
@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).
@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.
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}.
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.
+2003-01-29 Yoichi NAKAYAMA <yoichi@eken.phys.nagoya-u.ac.jp>
+
+ * 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 <yoichi@eken.phys.nagoya-u.ac.jp>
+
+ * 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 <yoichi@eken.phys.nagoya-u.ac.jp>
+
+ * elmo-localdir.el (elmo-folder-expand-msgdb-path): Correct msgdb
+ path for "+~/something".
+
+2003-01-15 Yoichi NAKAYAMA <yoichi@eken.phys.nagoya-u.ac.jp>
+
+ * 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 <kamo@ITmanage.co.jp>.
+
+2003-01-10 Tsutomu OKADA <okada@furuno.co.jp>
+
+ * elmo-map.el (elmo-folder-pack-numbers): Fix name of the function.
+
+2003-01-06 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * 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 <yoichi@eken.phys.nagoya-u.ac.jp>
+
+ * utf7.el (toplevel): Avoid error when the function
+ find-coding-system does not exist.
+
+2002-12-20 Yoichi NAKAYAMA <yoichi@eken.phys.nagoya-u.ac.jp>
+
+ * 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 <okada@opaopa.org>
+
+ * elmo-version.el (elmo-version): Up to 2.11.1.
+
2002-12-10 Kenichi OKADA <okada@opaopa.org>
* elmo-archive.el: Specify charset.
(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
(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
(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))))
(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
(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)
(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
(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))
(memq (elmo-dop-queue-method que)
elmo-dop-queue-merge-method-list)
(setq match-queue
- (car (delete
+ (car (delete
nil
(mapcar
(lambda (nqueue)
(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.")
(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.")
(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.")
;;
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)))))
'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))
(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))))
(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))
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)
(+
(* (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)))
(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.")
(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))
(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)))
: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")
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)))
(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)
(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.
(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."
(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."
;; 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)
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
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."
(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.
(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.
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
;;; [[ 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")
; (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 ]]
; ("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 ]]
; (setq buffers (cdr buffers))))))
;(run-with-idle-timer 20 t 'my-wl-auto-save-draft-buffers)
+;; PGP \e$B$G0E9f2=$9$k;~$K<+J,$N8x3+80$b4^$a$k!#\e(B
+;; (\e$B$=$N%a%C%;!<%8$r<+J,$G$bFI$a$k$h$&$K\e(B)
+;(setq pgg-encrypt-for-me t)
+
;;; [[ \e$B%F%s%W%l!<%H\e(B ]]
; ("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)\e$B$G$"$l$P4X78$9$kA4$F$N?M!&Ej9F@h$KJV?.$9$k!#\e(B
-;(setq wl-draft-reply-with-argument-list
-; '(("Followup-To" . (("From") nil ("Followup-To")))
-; ("Newsgroups" . (("From") nil ("Newsgroups")))
+;; 2.11.0 \e$B0JA0$N%G%U%)%k%H@_Dj\e(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))))
;;; [[ \e$B%a%C%;!<%8I=<($N@_Dj\e(B ]]
+2003-01-28 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * 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 <kaoru@kaisei.org>
+
+ * 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 <kaoru@kaisei.org>
+
+ * check-modules.el (check-modules-semi-mime-edit): Check
+ `mime-create-tag'.
+
+2003-01-06 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * test-dist.el (test-wl-demo-copyright-notice): Check always.
+
2002-12-11 TAKAHASHI Kaoru <kaoru@kaisei.org>
* test-dist.el (test-version-toplevel-changelog): Fixed regexp.
;; mel-b-ccl on XEmacs 21.1
;; <http://lists.airs.net/wl/archive/200101/msg00075.html>
-(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=
(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)))
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)))
-
;;;
;; 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))))
(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")))
(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]<Suggest>
(lunit-assert (fboundp 'mime-entity-children)) ; [Required]<Suggest>
(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]
(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]<Suggest>
(lunit-assert (fboundp 'mime-encode-field-body))) ; [Required]<Suggest>
;; 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]<Suggest>
(lunit-assert (fboundp 'mime-decode-string))
(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]<Suggest>
(lunit-assert (boundp 'mime-mailcap-file)) ; [Required]<Suggest>
(lunit-assert (fboundp 'mime-format-mailcap-command))) ; [Required]<Suggest>
;; 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]
(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))
(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)))
(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))))
(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))))
(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)))
+2003-01-29 Yoichi NAKAYAMA <yoichi@eken.phys.nagoya-u.ac.jp>
+
+ * 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 <yoichi@eken.phys.nagoya-u.ac.jp>
+
+ * 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 <yoichi@eken.phys.nagoya-u.ac.jp>
+
+ * wl-draft.el (wl-draft-insert-from-field): Encode wl-from and
+ insert it.
+
+2003-01-21 Kenichi OKADA <okada@opaopa.org>
+
+ * wl-vars.el (wl-message-id-use-wl-from): Change defalut to t.
+
+2003-01-20 Yoichi NAKAYAMA <yoichi@eken.phys.nagoya-u.ac.jp>
+
+ * 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 <yoichi@eken.phys.nagoya-u.ac.jp>
+
+ * wl-summary.el (wl-summary-exec-subr): Unset wl-message-buffer if
+ it is not up-tp-date.
+
+2003-01-12 Yoichi NAKAYAMA <yoichi@eken.phys.nagoya-u.ac.jp>
+
+ * 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 <kaoru@kaisei.org>
+
+ * wl-draft.el (wl-draft-remove-text-plain-tag): Use
+ `mime-create-tag'. Use `string=' instead of `looking-at'.
+
+2003-01-11 Yoichi NAKAYAMA <yoichi@eken.phys.nagoya-u.ac.jp>
+
+ * 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 <muse@ba2.so-net.ne.jp>
+
+ * wl-draft.el (wl-draft-reedit): Avoid error on Meadow [wl:11209].
+
+2003-01-06 Mito <mito@mxa.nes.nec.co.jp>
+
+ * wl-summary.el (wl-summary-line-list-info): Use %f to make
+ list-count instead of %d.
+
+2003-01-06 Yoichi NAKAYAMA <yoichi@eken.phys.nagoya-u.ac.jp>
+
+ * 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 <minakaji@osaka.email.ne.jp>
+
+ * wl-draft.el (wl-draft-self-reply-p): Add doc string.
+
+2003-01-01 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * wl-demo.el (wl-demo-copyright-notice): Add 2003.
+
+2002-12-31 Ron Isaacson <Ron.Isaacson@morganstanley.com>
+
+ * wl-summary.el (wl-summary-mark-collect): Revive missing return
+ for sequential numbering case.
+
+2002-12-25 Yoichi NAKAYAMA <yoichi@eken.phys.nagoya-u.ac.jp>
+
+ * 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 <yoichi@eken.phys.nagoya-u.ac.jp>
+
+ * wl-e21.el (toplevel): Do not set wl-folder-mode-map.
+ (avoid error for the case without byte-compiling)
+
+2002-12-23 Kenichi OKADA <okada@opaopa.org>
+
+ * 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 <okada@opaopa.org>
+
+ * 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 <okada@opaopa.org>
+
+ * wl-draft.el (wl-draft-send): Preview when interactive send.
+
+2002-12-22 Kenichi OKADA <okada@opaopa.org>
+
+ * 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 <yoichi@eken.phys.nagoya-u.ac.jp>
+
+ * 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 <okada@opaopa.org>
+
+ * 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 <yoichi@eken.phys.nagoya-u.ac.jp>
+
+ * 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 <okada@opaopa.org>
+
+ * 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 <okada@opaopa.org>
+
+ * 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 <okada@opaopa.org>
+
+ * wl-news.el.in (wl-news): Add `delete-other-windows'.
+
+2002-12-21 Kenichi OKADA <okada@opaopa.org>
+
+ * 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 <okada@opaopa.org>
+
+ * wl-news.el.in (wl-news-send-news): Add 'Date' header.
+
+2002-12-20 Yoichi NAKAYAMA <yoichi@eken.phys.nagoya-u.ac.jp>
+
+ * 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 <okada@opaopa.org>
+
+ * wl-news.el.in (wl-news-send-news): Delete
+ Organization and X-Face.
+
+2002-12-20 Kenichi OKADA <okada@opaopa.org>
+
+ * 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 <okada@opaopa.org>
+
+ * Version number is increased to 2.11.1.
+
+2002-12-19 Kenichi OKADA <okada@opaopa.org>
+
+ * wl-news.el.in : New file.
+
+2002-12-19 Kenichi OKADA <okada@opaopa.org>
+
+ * wl-vars.el (wl-draft-reply-with-argument-list): Change
+ default value.
+ (wl-draft-reply-without-argument-list): Ditto.
+
+2002-12-19 Kenichi OKADA <okada@opaopa.org>
+
+ * 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 <teranisi@gohome.org>
* wl-thread.el (wl-thread-insert-message): Use
proc entries settings folder-top type caches msgdb-dir)
(if (null (car service))
(if (setq caches
- (delq
+ (delq
nil
(mapcar
(lambda (dirent)
(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
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
"/~/")
'((RETURN ("*"))))))
(when entries
- (elmo-object-save
+ (elmo-object-save
(expand-file-name
(concat "acap/" (car service) "/" wl-acap-user "/"
wl-acap-cache-filename)
;;; Code:
(defconst wl-demo-copyright-notice
- "Copyright (C) 1998-2002 Yuuichi Teranishi <teranisi@gohome.org>"
+ "Copyright (C) 1998-2003 Yuuichi Teranishi <teranisi@gohome.org>"
"A declaration of the copyright on Wanderlust.")
(eval-when-compile
"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."
(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.
(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))))
((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)
","))))
(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))
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"))
(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)
(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)
;; (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
(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)))
;; 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
(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
(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
(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))
(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))
(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)
["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]
"----"
(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))
(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))
(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
(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.
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
(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
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))))
(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
(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)))
(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)
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)))
((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
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)
(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"
(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))
(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)
(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)
(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 ()
(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
(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))
"")))
(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)
(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)
(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)))
(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)
(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)
: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)
(?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.")
(?@ (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.")
"*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
: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,
(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)
(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)
(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
: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")
: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)
(?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.")
: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)
: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)
: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)
("^-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
: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)
;;;; 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)
(require 'wl-summary)
(require 'wl-thread)
(require 'wl-address)
+(require 'wl-news)
(wl-draft-mode-setup)
(require 'wl-draft)
(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
(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))
(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"))
(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))