This commit was manufactured by cvs2svn to create branch 'elmo-imap4-new- elmo-imap4-new-search-root
authortomo <tomo>
Sun, 3 Jul 2011 13:28:57 +0000 (13:28 +0000)
committertomo <tomo>
Sun, 3 Jul 2011 13:28:57 +0000 (13:28 +0000)
search'.

47 files changed:
ChangeLog
INSTALL
INSTALL.ja
NEWS
NEWS.ja
WL-MK
doc/wl-ja.texi
doc/wl.texi
elmo/ChangeLog
elmo/acap.el
elmo/elmo-archive.el
elmo/elmo-imap4.el
elmo/elmo-localdir.el
elmo/elmo-map.el
elmo/elmo-nntp.el
elmo/elmo-pop3.el
elmo/elmo-util.el
elmo/elmo.el
elmo/utf7.el
tests/ChangeLog
tests/test-dist.el
tests/test-elmo-date.el
tests/test-elmo-imap4.el
tests/test-elmo-localdir.el
tests/test-elmo-util.el
tests/test-rfc2368.el
tests/test-utf7.el
tests/test-wl-address.el [new file with mode: 0644]
tests/test-wl-draft.el
tests/test-wl-util.el
utils/ChangeLog
utils/ptexinfmt.el
utils/rfc2368.el
utils/ssl.el
utils/wl-addrbook.el
utils/wl-complete.el
wl/ChangeLog
wl/wl-address.el
wl/wl-demo.el
wl/wl-draft.el
wl/wl-e21.el
wl/wl-mime.el
wl/wl-spam.el
wl/wl-summary.el
wl/wl-template.el
wl/wl-vars.el
wl/wl-xmas.el

index da8f88f..de7bf5a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2011-02-01  Tetsurou Okazaki  <okazaki@be.to>
+
+       * WL-MK (wl-scan-path): New function.
+       (wl-scan-source): Use `wl-scan-path'.
+       (wl-scan-icons): New function.
+       (uninstall-wl-icons): Use `wl-scan-icons'.
+       Check existence of `PIXMAPDIR'.
+
+2010-07-19  TAKAHASHI Kaoru  <kaoru@kaisei.org>
+
+       * INSTALL: Update recommended version of APEL.
+       * INSTALL.ja: Ditto.
+
+2010-07-11  David Maus  <dmaus@ictsoc.de>
+
+       * doc/wl.texi (Variables of Summary): Replace unicode character.
+
+2010-04-29  Tetsurou Okazaki  <okazaki@be.to>
+
+       * WL-MK (uninstall-wl-icons): New function.  Uninstall *.img
+       files as well.
+       (uninstall-wl-package): Use `uninstall-wl-icons'.
+
 2010-03-03  TAKAHASHI Kaoru  <kaoru@kaisei.org>
 
        * etc/icons/unplugged.xpm: Change design. Use `unplugged' style
diff --git a/INSTALL b/INSTALL
index 6728742..7e6ba67 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -34,24 +34,24 @@ Select MIME Module
 
   (a) XEmacs 21.1 or later
 
-       APEL 10.7, FLIM 1.14.9, SEMI 1.14.6
+       APEL 10.8, FLIM 1.14.9, SEMI 1.14.6
 
     Installation as a XEmacs package, If possible.
 
   (b) Emacs 20.4 or later
 
-       APEL 10.7, FLIM 1.14.9, SEMI 1.14.6
+       APEL 10.8, FLIM 1.14.9, SEMI 1.14.6
 
  (c) Emacs 20.1 to 20.3
 
-       APEL 10.7, CLIME 1.14.6, SEMI 1.14.6
+       APEL 10.8, CLIME 1.14.6, SEMI 1.14.6
 
     Use CLIME instead of FLIM.  FLIM does not support Emacs 20.3 or
     earlier.
 
   (d) Emacs 19.34 (Mule 2.3)
 
-       APEL 10.7, CLIME 1.14.6, SEMI 1.14.6
+       APEL 10.8, CLIME 1.14.6, SEMI 1.14.6
 
     Mule based on Emacs 19.34 can also run SEMI.  See the following web
     page to get more information (in Japanese).
index b2ea832..bc97d27 100644 (file)
@@ -33,23 +33,23 @@ MIME\e$BMQ%b%8%e!<%k$NA*Br\e(B
 
   (a) XEmacs 21.1 \e$B0J9_\e(B
 
-       APEL 10.7, FLIM 1.14.9, SEMI 1.14.6
+       APEL 10.8, FLIM 1.14.9, SEMI 1.14.6
 
     \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.7, FLIM 1.14.9, SEMI 1.14.6
+       APEL 10.8, FLIM 1.14.9, SEMI 1.14.6
 
   (c) Emacs 20.1\e$B!A\e(B20.3
 
-       APEL 10.7, CLIME 1.14.6, SEMI 1.14.6
+       APEL 10.8, CLIME 1.14.6, SEMI 1.14.6
 
     FLIM \e$B$,F0$-$^$;$s$N$G!"Be$o$j$K\e(B CLIME \e$B$r%$%s%9%H!<%k$7$F$/$@$5$$!#\e(B
 
   (d) Emacs 19.34 (Mule 2.3)
 
-       APEL 10.7, CLIME 1.14.6, SEMI 1.14.6
+       APEL 10.8, CLIME 1.14.6, SEMI 1.14.6
 
     Emacs 19.34 \e$B%Y!<%9$N\e(B Mule \e$B$G$O\e(B SEMI \e$B$rF0:n$5$;$k$3$H$,2DG=$G$9!#2<5-\e(B
     \e$B$N%Z!<%8$,;29M$K$J$j$^$9!#\e(B
diff --git a/NEWS b/NEWS
index 695d3ec..c28552b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,12 @@ Wanderlust NEWS -- User-visible changes in Wanderlust.
 
 * Changes in 2.16.0 from 2.14.x
 
+** Prevent accidental loss of messages when renaming IMAP folder
+
+** Put spam mark on the message registered as spam.
+
+** Remove spam mark from the message registered as non-spam.
+
 ** Added support for ESEARCH feature (RFC4731).
 
 ** New option `elmo-imap4-set-seen-flag-explicitly'.
diff --git a/NEWS.ja b/NEWS.ja
index 966f40a..3ae8a4c 100644 (file)
--- a/NEWS.ja
+++ b/NEWS.ja
@@ -2,6 +2,10 @@ Wanderlust NEWS (\e$BF|K\8lHG\e(B) -- User-visible changes in Wanderlust.
 
 * 2.14.x \e$B$+$i\e(B 2.16.0 \e$B$X$NJQ99E@\e(B
 
+** spam \e$B$H$7$FEPO?$7$?%a%C%;!<%8$K\e(B spam \e$B%^!<%/$rIU$1$^$9!#\e(B
+
+** non-spam \e$B$H$7$FEPO?$7$?%a%C%;!<%8$+$i\e(B spam \e$B%^!<%/$r<h$j=|$-$^$9!#\e(B
+
 ** ESEARCH (RFC4731) \e$B$,%5%]!<%H$5$l$^$7$?!#\e(B
 
 ** \e$B?75,%*%W%7%g%s\e(B elmo-imap4-set-seen-flag-explicitly \e$B$,DI2C$5$l$^$7$?!#\e(B
diff --git a/WL-MK b/WL-MK
index d7ab2d6..0086a93 100644 (file)
--- a/WL-MK
+++ b/WL-MK
       (setq files (cdr files)))
     (lunit suite)))
 
-(defun wl-scan-source (path)
-  (let (ret)
-    (mapc
-     (lambda (x)
-       (mapc (lambda (y)
-              (setq ret (append (list y (concat y "c")) ret)))
-            (directory-files x nil "\\(.+\\)\\.el$" t)))
-     path)
-    ret))
+(defun wl-scan-path (path scanner)
+  (let ((dirs (if (listp path)
+                 path
+               (list path))))
+    (apply 'append (mapcar scanner dirs))))
 
+(defun wl-scan-source (path)
+  (wl-scan-path path
+               (lambda (x)
+                 (apply 'append
+                        (mapcar (lambda (y)
+                                  (list y (concat y "c")))
+                                (directory-files x nil "\\(.+\\)\\.el$" t))))))
+
+(defun wl-scan-icons (path)
+  (wl-scan-path path
+               (lambda (x)
+                 (let ((case-fold-search t))
+                   (directory-files x nil "\\.img$\\|\\.x[bp]m$")))))
 
 (defun wl-uninstall (objs path)
   ;(message (mapconcat 'identity objs " "))
                                        "\\.img$\\|\\.xbm$")))))
     (install-files icons ICONDIR PIXMAPDIR nil 'overwrite)))
 
+(defun uninstall-wl-icons ()
+  (if (not (file-directory-p PIXMAPDIR))
+      ()
+    (wl-uninstall (wl-scan-icons PIXMAPDIR)
+                 PIXMAPDIR)))
+
 (defun install-wl-package ()
   (compile-wl-package)
   (let ((wl-install-dir (expand-file-name WL_PREFIX LISPDIR))
     (wl-uninstall (wl-scan-source (list ELMODIR))
                  elmo-install-dir))
   (if PIXMAPDIR
-      (let* ((case-fold-search t)
-            (icons (directory-files PIXMAPDIR t "\\.x[bp]m$"))
-            icon)
-       (while icons
-         (setq icon (car icons)
-               icons (cdr icons))
-         (if (and (file-exists-p icon)
-                  (file-writable-p icon))
-             (progn
-               (princ (format "%s was uninstalled.\n" icon))
-               (delete-file icon)))))))
+      (uninstall-wl-icons)))
 
 
 (defun config-wl-package-xmas ()
index 0c140f4..58d7a3b 100644 (file)
@@ -7113,22 +7113,22 @@ spam \e$B$+$I$&$+$N%F%9%H$r9T$$$^$9!#\e(Bspam \e$B$HH=Dj$5$l$?%a%C%;!<%8$K$O!"\e(Bsp
 @item k s
 @kindex k s (Summary)
 @findex wl-summary-register-as-spam
-\e$B%+!<%=%k9T$N%a%C%;!<%8$r\e(B spam \e$B$H$7$FEPO?$7$^$9!#\e(B
+\e$B%+!<%=%k9T$N%a%C%;!<%8$r\e(B spam \e$B$H$7$FEPO?$7\e(B spam \e$B%^!<%/$rIU$1$^$9!#\e(B
 
 @item k S
 @kindex k S (Summary)
 @findex wl-summary-register-as-spam-all
-\e$B%U%)%k%@Fb$NA4$F$N%a%C%;!<%8$r\e(B spam \e$B$H$7$FEPO?$7$^$9!#\e(B
+\e$B%U%)%k%@Fb$NA4$F$N%a%C%;!<%8$r\e(B spam \e$B$H$7$FEPO?$7\e(B spam \e$B%^!<%/$rIU$1$^$9!#\e(B
 
 @item k n
 @kindex k n (Summary)
 @findex wl-summary-register-as-good
-\e$B%+!<%=%k9T$N%a%C%;!<%8$r\e(B non-spam \e$B$H$7$FEPO?$7$^$9!#\e(B
+\e$B%+!<%=%k9T$N%a%C%;!<%8$r\e(B non-spam \e$B$H$7$FEPO?$7\e(B spam \e$B%^!<%/$r<h$j=|$-$^$9!#\e(B
 
 @item k N
 @kindex k N (Summary)
 @findex wl-summary-register-as-good-all
-\e$B%U%)%k%@Fb$NA4$F$N%a%C%;!<%8$r\e(B non-spam \e$B$H$7$FEPO?$7$^$9!#\e(B
+\e$B%U%)%k%@Fb$NA4$F$N%a%C%;!<%8$r\e(B non-spam \e$B$H$7$FEPO?$7\e(B spam \e$B%^!<%/$r<h$j=|$-$^$9!#\e(B
 
 @item r k m
 @kindex r k m (Summary)
@@ -7141,6 +7141,16 @@ spam \e$B$+$I$&$+$N%F%9%H$r9T$$$^$9!#\e(Bspam \e$B$HH=Dj$5$l$?%a%C%;!<%8$K$O!"\e(Bsp
 \e$B;XDj%j!<%8%g%s$K$"$k%a%C%;!<%8$r%F%9%H$7!"\e(Bspam \e$B$HH=Dj$5$l$?>l9g$K\e(B spam \e$B%^!<%/$r\e(B
 \e$BIU$1$^$9!#\e(Bspam \e$B$G$J$$$HH=Dj$5$l$?>l9g$O\e(B spam \e$B%^!<%/$r<h$j=|$-$^$9!#\e(B
 
+@item r k s
+@kindex r k s (Summary)
+@findex wl-summary-register-as-spam-region
+\e$B;XDj%j!<%8%g%s$K$"$k%a%C%;!<%8$r\e(B spam \e$B$H$7$FEPO?$7\e(B spam \e$B%^!<%/$rIU$1$^$9!#\e(B
+
+@item r k n
+@kindex r k n (Summary)
+@findex wl-summary-register-as-good-region
+\e$B;XDj%j!<%8%g%s$K$"$k%a%C%;!<%8$r\e(B non-spam \e$B$H$7$FEPO?$7\e(B spam \e$B%^!<%/$r<h$j=|$-$^$9!#\e(B
+
 @item t k m
 @kindex t k m (Summary)
 @findex wl-thread-spam
@@ -7157,6 +7167,22 @@ spam \e$B$G$J$$$HH=Dj$5$l$?>l9g$O\e(B spam \e$B%^!<%/$r<h$j=|$-$^$9!#\e(B
 prefix argument \e$B$D$-$J$i$P%+!<%=%k9T$,$"$k%a%C%;!<%8$r4^$`%9%l%C%IA4$F$K\e(B
 \e$BE,MQ$7$^$9!#\e(B
 
+@item t k s
+@kindex t k s (Summary)
+@findex wl-thread-register-as-spam
+\e$B%+!<%=%k9T$,$"$k%a%C%;!<%8$r@hF,$H$9$k%9%l%C%I$N%a%C%;!<%8$r\e(B spam \e$B$H$7$FEPO?$7\e(B
+spam \e$B%^!<%/$rIU$1$^$9!#\e(B
+prefix argument \e$B$D$-$J$i$P%+!<%=%k9T$,$"$k%a%C%;!<%8$r4^$`%9%l%C%IA4$F$K\e(B
+\e$BE,MQ$7$^$9!#\e(B
+
+@item t k n
+@kindex t k n (Summary)
+@findex wl-thread-register-as-good
+\e$B%+!<%=%k9T$,$"$k%a%C%;!<%8$r@hF,$H$9$k%9%l%C%I$N%a%C%;!<%8$r\e(B non-spam \e$B$H$7$FEPO?$7\e(B
+spam \e$B%^!<%/$r<h$j=|$-$^$9!#\e(B
+prefix argument \e$B$D$-$J$i$P%+!<%=%k9T$,$"$k%a%C%;!<%8$r4^$`%9%l%C%IA4$F$K\e(B
+\e$BE,MQ$7$^$9!#\e(B
+
 @item m k
 @kindex m k (Summary)
 @findex wl-summary-target-mark-spam
@@ -7166,12 +7192,12 @@ prefix argument \e$B$D$-$J$i$P%+!<%=%k9T$,$"$k%a%C%;!<%8$r4^$`%9%l%C%IA4$F$K\e(B
 @item m s
 @kindex m s (Summary)
 @findex wl-summary-target-mark-register-as-spam
-\e$B$^$H$a=hM}MQ%^!<%/\e(B @samp{*} \e$B$N$D$$$?%a%C%;!<%8$r\e(B spam \e$B$H$7$FEPO?$7$^$9!#\e(B
+\e$B$^$H$a=hM}MQ%^!<%/\e(B @samp{*} \e$B$N$D$$$?%a%C%;!<%8$r\e(B spam \e$B$H$7$FEPO?$7\e(B spam \e$B%^!<%/$rIU$1$^$9!#\e(B
 
 @item m n
 @kindex m n (Summary)
 @findex wl-summary-target-mark-register-as-good
-\e$B$^$H$a=hM}MQ%^!<%/\e(B @samp{*} \e$B$N$D$$$?%a%C%;!<%8$r\e(B non-spam \e$B$H$7$FEPO?$7$^\e(B
+\e$B$^$H$a=hM}MQ%^!<%/\e(B @samp{*} \e$B$N$D$$$?%a%C%;!<%8$r\e(B non-spam \e$B$H$7$FEPO?$7\e(B spam \e$B%^!<%/$r<h$j=|$-$^$9!#\e(B
 \e$B$9!#\e(B
 @end table
 
index f2517c2..52b5baf 100644 (file)
@@ -4380,7 +4380,7 @@ folders are cached.
 
 @item wl-summary-resend-use-cache
 @vindex wl-summary-resend-use-cache
-The initial setting is @code{nil}¡£If non-nil, messages are resend
+The initial setting is @code{nil}.  If non-nil, messages are resend
 using cache even in the offline status. Note that if you use cache,
 the message identity is not guaranteed.
 
@@ -7170,22 +7170,22 @@ argument, test all messages regardless of their marks.
 @item k s
 @kindex k s (Summary)
 @findex wl-summary-register-as-spam
-Register current message as spam.
+Register current message as spam and put spam mark.
 
 @item k S
 @kindex k S (Summary)
 @findex wl-summary-register-as-spam-all
-Register all messages in the folder as spam.
+Register all messages in the folder as spam and put spam mark.
 
 @item k n
 @kindex k n (Summary)
 @findex wl-summary-register-as-good
-Register current message as non-spam.
+Register current message as non-spam and remove spam mark.
 
 @item k N
 @kindex k N (Summary)
 @findex wl-summary-register-as-good-all
-Register all messages in the folder as non-spam.
+Register all messages in the folder as non-spam and remove spam mark.
 
 @item r k m
 @kindex r k m (Summary)
@@ -7198,6 +7198,16 @@ Put spam mark on messages in the specified region.
 Test messages in the specified region and put spam mark if judged as spam.
 Remove spam mark if judged as non-spam.
 
+@item r k s
+@kindex r k s (Summary)
+@findex wl-summary-register-as-spam-region
+Register messages in the specified region as spam and put spam mark.
+
+@item r k n
+@kindex r k n (Summary)
+@findex wl-summary-register-as-good-region
+Register messages in the specified region as non-spam and remove spam mark.
+
 @item t k m
 @kindex t k m (Summary)
 @findex wl-thread-spam
@@ -7211,6 +7221,20 @@ Test messages which are the descendant of the current thread and put spam mark
 if judged as spam.  Remove spam mark if judged as non-spam.
 With prefix argument, it affects on the all messages in the thread tree.
 
+@item t k s
+@kindex t k s (Summary)
+@findex wl-thread-register-as-spam
+Register messages which are the descendant of the current thread as spam
+and put spam mark.
+With prefix argument, it affects on the all messages in the thread tree.
+
+@item t k n
+@kindex t k n (Summary)
+@findex wl-thread-register-as-good
+Register messages which are the descendant of the current thread as non-spam
+and remove spam mark.
+With prefix argument, it affects on the all messages in the thread tree.
+
 @item m k
 @kindex m k (Summary)
 @findex wl-summary-target-mark-spam
@@ -7219,12 +7243,12 @@ Put spam mark (@samp{s}) on messages with the target mark @samp{*}.
 @item m s
 @kindex m s (Summary)
 @findex wl-summary-target-mark-register-as-spam
-Register messages with the target mark @samp{*} as spam.
+Register messages with the target mark @samp{*} as spam and put spam mark.
 
 @item m n
 @kindex m n (Summary)
 @findex wl-summary-target-mark-register-as-good
-Register messages with the target mark @samp{*} as non-spam.
+Register messages with the target mark @samp{*} as non-spam and remove spam mark.
 @end table
 
 @subsection Customizable Variables
index 3ceb6d7..4c9e946 100644 (file)
@@ -1,3 +1,116 @@
+2011-07-03  David Maus  <dmaus@ictsoc.de>
+
+       * elmo-imap4.el (elmo-imap4-session-unselect-mailbox): New
+       function. Leave selected state without silent EXPUNGE.
+       (elmo-folder-rename-internal): Use function.
+
+2011-06-03  David Maus  <dmaus@ictsoc.de>
+
+       * elmo-imap4.el (elmo-imap4-fetch-callback-1-subr): Don't mark
+       unread messages with important or answered flag read.
+
+2011-05-29  David Maus  <dmaus@ictsoc.de>
+
+       * elmo-imap4.el (elmo-network-authenticate-session): Always ask
+       for capabilities after login.
+       (elmo-imap4-parse-response): Remove superfluous third argument to
+       split-string.
+
+2011-01-12  David Maus  <dmaus@ictsoc.de>
+
+       * elmo-nntp.el (elmo-nntp-folder-msgdb-create): Remove accidental
+       rebinding of new message db symbol.
+
+2010-11-02  Kazuhiro Ito  <kzhr@d1.dion.ne.jp>
+
+       * elmo-pop3.el (elmo-folder-open-internal): Don't load location
+       map if it is already loaded.
+
+2010-10-31  David Maus  <dmaus@ictsoc.de>
+
+       * elmo-map.el (elmo-folder-open-internal): Don't load location map
+       if it is already loaded.
+
+       * elmo.el (elmo-folder-open-internal-p)
+       (elmo-folder-move-messages): Method removed.
+       * elmo-filter.el (elmo-folder-open-internal-p): Dto.
+       * elmo-map.el (elmo-folder-open-internal-p): Dto.
+       * elmo-multi.el (elmo-folder-open-internal-p): Dto.
+       * elmo-pipe.el (elmo-folder-open-internal-p): Dto.
+       * elmo-pop3.el (elmo-folder-open-internal-p): Dto.
+       * elmo-shimbun.el (elmo-folder-open-internal-p): Dto.
+
+2010-10-24  David Maus  <dmaus@ictsoc.de>
+
+       * elmo-pop3.el (elmo-folder-open-internal-p): Define method for
+       this class.
+       * elmo-shimbun.el (elmo-folder-open-internal-p): Dto.
+       * elmo-multi.el (elmo-folder-open-internal-p): Fix invalid let
+       statement.
+
+2010-10-14  David Maus  <dmaus@ictsoc.de>
+
+       * elmo-multi.el (elmo-folder-open-internal-p): Evaluate symbol to
+       return state of child folders.
+
+2010-10-13  David Maus  <dmaus@ictsoc.de>
+
+       * elmo-multi.el (elmo-folder-open-internal-p): Start with t and
+       set to nil if one of the child folders is not open.
+       (elmo-folder-open-internal): Open child folders only if they are
+       not opened yet.
+
+2010-08-31  TAKAHASHI Kaoru  <kaoru@kaisei.org>
+
+       * elmo-imap4.el: Remove trailing whitespace.
+
+       * elmo-localdir.el (elmo-folder-pack-numbers): Fix
+       `elmo-bind-directory' indent.
+
+       * elmo-imap4.el (elmo-imap4-folder-list-range): Fix indent (only
+       cosmetic fix).
+
+2010-08-27  TAKAHASHI Kaoru  <kaoru@kaisei.org>
+
+       * elmo-util.el (elmo-delete-char): Fix `elmo-set-work-buf' indent.
+       (elmo-delete-cr, elmo-get-file-string, elmo-save-string)
+       (elmo-string-to-list, elmo-list-to-string): Ditto.
+
+2010-08-26  TAKAHASHI Kaoru  <kaoru@kaisei.org>
+
+       * elmo-archive.el (elmo-archive-field-condition-match)
+       (elmo-archive-suffix-alist)
+       (elmo-archive-create-file, elmo-archive-folder-append-buffer)
+       (elmo-archive-folder-message-make-temp-files)
+       (elmo-archive-append-files)
+       (elmo-archive-field-condition-match): Fix indent.
+
+       * elmo-pop3.el (elmo-pop3-read-response): Fix `response-string'.
+       Avoid `args-out-of-range 0, 1' error.
+
+2010-08-24  TAKAHASHI Kaoru  <kaoru@kaisei.org>
+
+       * acap.el (acap-arrival-filter): Use (delete-char (- X)) instead of
+       (delete-backward-char X) that deletes region in Emacs 24.
+       See delete-active-region described in NEWS.
+       * elmo-imap4.el (elmo-imap4-arrival-filter): Ditto.
+       * elmo-util.el (elmo-get-file-string): Ditto.
+       * utf7.el (utf7-encode-internal, utf7-decode-internal): Ditto.
+
+2010-08-09  David Maus  <dmaus@ictsoc.de>
+
+       * elmo.el (elmo-folder-open-internal-p): New luna method.
+       (elmo-folder-move-messages): Open source folder only if necessary.
+       * elmo-pipe.el (elmo-folder-open-internal-p): New luna method.
+       * elmo-multi.el (elmo-folder-open-internal-p): Dto.
+       * elmo-map.el (elmo-folder-open-internal-p): Dto.
+       * elmo-filter.el (elmo-folder-open-internal-p): Dto.
+
+2010-08-01  David Maus  <dmaus@ictsoc.de>
+
+       * elmo.el (elmo-folder-move-messages): Open source folder before
+       moving messages.
+
 2010-04-15  David Maus  <dmaus@ictsoc.de>
 
        * elmo-imap4.el (elmo-imap4-folder-name-syntax): Allow numbers in
 
 2005-02-17  ARISAWA Akihiro  <ari@mbf.sphere.ne.jp>
 
-       * elmo-shimbun.el (elmo-folder-exists-p): Use `shimbun-group-p' 
+       * elmo-shimbun.el (elmo-folder-exists-p): Use `shimbun-group-p'
        if available.
 
 2005-02-18  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
        * elmo.el (elmo-folder-append-buffer): Fix docstring.
        (elmo-generic-folder-append-messages): If elmo-message-flags return nil,
        pass (read) for the FLAG argument of elmo-folder-append-buffer.
-       
+
 2004-10-02  Yoichi NAKAYAMA  <yoichi@geiin.org>
 
        * elmo-split.el (elmo-split-rule): Update comment.
 
        * modb-entity.el (elmo-message-entity-handler): If CAR element of entity
        is `t', treat it as legacy entity.
-       
+
        * elmo.el (elmo-message-flag-available-p): New generic function.
        (elmo-message-number): Ditto.
        (elmo-message-field): Use `elmo-msgdb-message-field'.
        warnings.
 
        * elmo-file.el: New file.
-       
+
        * modb-standard.el (elmo-msgdb-list-flagged): Treat keyword flags.
 
        * elsp-sa.el (elmo-spam-spamassassin-max-messages-per-process): New
        elmo-msgdb-message-entity-number.
        (elmo-msgdb-append-entity): Ditto.
        (elmo-msgdb-create-message-entity-from-file): Remove.
-       (elmo-msgdb-create-message-entity-from-buffer): Use msgdb which 
+       (elmo-msgdb-create-message-entity-from-buffer): Use msgdb which
        corresponds to the entity.
        (elmo-msgdb-message-entity-number): Do nothing currently.
        (elmo-msgdb-message-entity-field): Ditto.
 
 2003-09-21  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
 
-       * modb-standard.el (elmo-msgdb-create-message-entity-from-buffer): 
+       * modb-standard.el (elmo-msgdb-create-message-entity-from-buffer):
        Fixed how to set extra field into entity.
        (elmo-msgdb-message-entity-set-field): Fixed mistake string for
        symbol.
        (elmo-map-folder-list-message-locations): elmo-message-entity-field.
 
        * elmo-sendlog.el (elmo-folder-msgdb-create): Use
-       elmo-msgdb-create-message-entity-from-file and 
+       elmo-msgdb-create-message-entity-from-file and
        elmo-message-entity-field.
 
        * elmo-pop3.el (elmo-pop3-sort-msgdb-by-original-number): Use
        * elmo-map.el (elmo-folder-pack-numbers): Use
        elmo-message-entity-set-number.
 
-       * elmo-maildir.el (elmo-folder-msgdb-create): 
+       * elmo-maildir.el (elmo-folder-msgdb-create):
        elmo-msgdb-create-message-entity-from-file instead of
        elmo-msgdb-create-overview-entity-from-file.
 
        elmo-messge-entity-field and elmo-message-entity-number.
        (elmo-imap4-fetch-callback-1): Call
        elmo-msgdb-create-message-entity-from-buffer instead of
-       elmo-msgdb-create-overview-from-buffer. 
+       elmo-msgdb-create-overview-from-buffer.
        (elmo-folder-msgdb-create-plugged): Use elmo-messge-entity-field.
        (elmo-find-fetch-strategy): Likewise.
 
-       * elmo-flag.el (elmo-folder-msgdb-create): Call 
+       * elmo-flag.el (elmo-folder-msgdb-create): Call
        elmo-localdir-msgdb-create-entity with argument msgdb.
 
        * elmo-dop.el (elmo-dop-msgdb): Use elmo-message-entity-number
        `elmo-msgdb-set-path'.
 
        * elmo-localdir.el (elmo-folder-pack-numbers): Ditto.
+
        * elmo-version.el (elmo-version): Up to 2.11.13.
 
        * elmo.el (elmo-generic-folder-commit): Don't load msgdb.
 
 2003-08-05  Yuuichi Teranishi  <teranisi@gohome.org>
 
-       * elmo-filter.el (elmo-folder-set-message-modified): Set 
+       * elmo-filter.el (elmo-folder-set-message-modified): Set
        message-modified slot of itself if it does not require target msgdb.
 
        * elmo-mime.el (elmo-mime-message-display): Display message entirely
 
 2002-05-05  David Smith <ultrasoul@ultrasoul.com>
 
-       * elmo-imap4.el (elmo-imap4-folder-diff-plugged): 
+       * elmo-imap4.el (elmo-imap4-folder-diff-plugged):
        Use SELECT when elmo-imap4-use-select-to-update-status is t.
 
 2003-07-24  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
        (elmo-folder-kill-messages): Ditto.
        (elmo-folder-synchronize): Use elmo-folder-kill-messages-before.
 
-       * elmo-imap4.el (elmo-folder-list-messages-plugged): 
+       * elmo-imap4.el (elmo-folder-list-messages-plugged):
        Don't use elmo-msgdb-max-of-killed. It is harmful when messages are
        killed not by synchronize (e.g. scoring).
 
 
 2003-03-25  Yuuichi Teranishi  <teranisi@gohome.org>
 
-       * elmo.el (elmo-folder-append-buffer): Changed argument from unread 
+       * elmo.el (elmo-folder-append-buffer): Changed argument from unread
        to flag. (All other related portions are changed.)
        (elmo-folder-msgdb-create): Likewise.
        (elmo-generic-folder-append-messages): Use flag-table instead of
        * 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.
 
 
        * elmo-multi.el (elmo-multi-folder-append-msgdb): Removed third
        argument for elmo-msgdb-append.
-       
+
 
        * elmo-msgdb.el (elmo-load-msgdb): New function.
        (elmo-make-msgdb): Ditto.
index c2ad7e3..a21501f 100644 (file)
@@ -587,7 +587,7 @@ ENTRIES is a store-entry list."
       (while (setq end (acap-find-next-line))
        (save-restriction
          (narrow-to-region (point-min) end)
-         (delete-backward-char (length acap-server-eol))
+         (delete-char (- (length acap-server-eol)))
          (goto-char (point-min))
          (unwind-protect
              (cond ((or (eq acap-state 'auth)
index a2b9549..274bde1 100644 (file)
      (rar . "^[ \t]%s\\([0-9]+\\)$"))))
 
 (defvar elmo-archive-suffix-alist
-   '((lha . ".lzh")  ; default
+  '((lha . ".lzh")                     ; default
 ;;;     (lha . ".lzs")
-     (zip . ".zip")
-     (zoo . ".zoo")
+    (zip . ".zip")
+    (zoo . ".zoo")
 ;;;     (arc . ".arc")
 ;;;     (arj . ".arj")
-     (rar . ".rar")
-     (tar . ".tar")
-     (tgz . ".tar.gz")))
+    (rar . ".rar")
+    (tar . ".tar")
+    (tgz . ".tar.gz")))
 
 ;;; lha
 (defvar elmo-archive-lha-method-alist
@@ -428,20 +428,19 @@ TYPE specifies the archiver's symbol."
        (error "WARNING: read-only mode: %s (method undefined)" type))
       (cond
        ((file-directory-p tmp-dir)
-       ()) ;nop
+       ())                             ; nop
        ((file-exists-p tmp-dir)
        ;; file exists
        (error "Create directory failed; File \"%s\" exists" tmp-dir))
        (t
        (elmo-make-directory tmp-dir)))
-      (elmo-bind-directory
-       tmp-dir
-       (write-region (point) (point) dummy nil 'no-msg)
-       (prog1
-          (elmo-archive-call-method method args)
-        (if (file-exists-p dummy)
-            (delete-file dummy)))
-       ))))
+      (elmo-bind-directory tmp-dir
+       (write-region (point) (point) dummy nil 'no-msg)
+       (prog1
+           (elmo-archive-call-method method args)
+         (if (file-exists-p dummy)
+             (delete-file dummy)))
+       ))))
 
 (luna-define-method elmo-folder-delete ((folder elmo-archive-folder))
   (let ((msgs (and (elmo-folder-exists-p folder)
@@ -601,24 +600,23 @@ TYPE specifies the archiver's symbol."
       (setq newfile (elmo-concat-path
                     prefix
                     (number-to-string next-num)))
-      (elmo-bind-directory
-       tmp-dir
-       (if (and (or (functionp method) (car method))
-               (file-writable-p newfile))
-          (progn
-            (setq dst-buffer (current-buffer))
-            (with-current-buffer src-buffer
-              (copy-to-buffer dst-buffer (point-min) (point-max)))
-            (as-binary-output-file
-                 (write-region (point-min) (point-max) newfile nil 'no-msg))
-            (when (elmo-archive-call-method method (list arc newfile))
-              (elmo-folder-preserve-flags
-               folder
-               (with-current-buffer src-buffer
-                 (elmo-msgdb-get-message-id-from-buffer))
-               flags)
-              t))
-        nil)))))
+      (elmo-bind-directory tmp-dir
+       (if (and (or (functionp method) (car method))
+                (file-writable-p newfile))
+           (progn
+             (setq dst-buffer (current-buffer))
+             (with-current-buffer src-buffer
+               (copy-to-buffer dst-buffer (point-min) (point-max)))
+             (as-binary-output-file
+              (write-region (point-min) (point-max) newfile nil 'no-msg))
+             (when (elmo-archive-call-method method (list arc newfile))
+               (elmo-folder-preserve-flags
+                folder
+                (with-current-buffer src-buffer
+                  (elmo-msgdb-get-message-id-from-buffer))
+                flags)
+               t))
+         nil)))))
 
 (defun elmo-folder-append-messages-*-archive (folder
                                              src-folder
@@ -706,22 +704,21 @@ TYPE specifies the archiver's symbol."
                                        (number-to-string x))) numbers))
         number)
     ;; Expand files in the tmp-dir-src.
-    (elmo-bind-directory
-     tmp-dir-src
-     (cond
-      ((functionp n-method)
-       (funcall n-method (cons arc tmp-msgs)))
-      (p-method
-       (let ((p-prog (car p-method))
-            (p-prog-arg (cdr p-method)))
-        (elmo-archive-exec-msgs-subr1
-         p-prog (append p-prog-arg (list arc)) tmp-msgs)))
-      (t
-       (let ((n-prog (car n-method))
-            (n-prog-arg (cdr n-method)))
-        (elmo-archive-exec-msgs-subr2
-         n-prog (append n-prog-arg (list arc)) tmp-msgs
-         (length arc))))))
+    (elmo-bind-directory tmp-dir-src
+      (cond
+       ((functionp n-method)
+       (funcall n-method (cons arc tmp-msgs)))
+       (p-method
+       (let ((p-prog (car p-method))
+             (p-prog-arg (cdr p-method)))
+         (elmo-archive-exec-msgs-subr1
+          p-prog (append p-prog-arg (list arc)) tmp-msgs)))
+       (t
+       (let ((n-prog (car n-method))
+             (n-prog-arg (cdr n-method)))
+         (elmo-archive-exec-msgs-subr2
+          n-prog (append n-prog-arg (list arc)) tmp-msgs
+          (length arc))))))
     ;; Move files to the tmp-dir-dst.
     (setq number start-number)
     (dolist (tmp-file tmp-msgs)
@@ -752,21 +749,20 @@ TYPE specifies the archiver's symbol."
       (ding)
       (error "WARNING: read-only mode: %s (method undefined)" dst-type))
     (save-excursion
-      (elmo-bind-directory
-       dir
-       (cond
-       ((functionp n-method)
-        (funcall n-method (cons arc files)))
-       (p-method
-        (let ((p-prog (car p-method))
-              (p-prog-arg (cdr p-method)))
-          (elmo-archive-exec-msgs-subr1
-           p-prog (append p-prog-arg (list arc)) files)))
-       (t
-        (let ((n-prog (car n-method))
-              (n-prog-arg (cdr n-method)))
-          (elmo-archive-exec-msgs-subr2
-           n-prog (append n-prog-arg (list arc)) files (length arc)))))))))
+      (elmo-bind-directory dir
+       (cond
+        ((functionp n-method)
+         (funcall n-method (cons arc files)))
+        (p-method
+         (let ((p-prog (car p-method))
+               (p-prog-arg (cdr p-method)))
+           (elmo-archive-exec-msgs-subr1
+            p-prog (append p-prog-arg (list arc)) files)))
+        (t
+         (let ((n-prog (car n-method))
+               (n-prog-arg (cdr n-method)))
+           (elmo-archive-exec-msgs-subr2
+            n-prog (append n-prog-arg (list arc)) files (length arc)))))))))
 
 (luna-define-method elmo-folder-delete-messages-internal ((folder
                                                           elmo-archive-folder)
@@ -1051,12 +1047,12 @@ TYPE specifies the archiver's symbol."
           (method (elmo-archive-get-method type 'cat))
           (args (list arc (elmo-concat-path prefix (number-to-string number)))))
       (elmo-set-work-buf
-       (when (file-exists-p arc)
-        (as-binary-process
-         (elmo-archive-call-method method args t))
-        (set-buffer-multibyte default-enable-multibyte-characters)
-        (decode-mime-charset-region (point-min)(point-max) elmo-mime-charset)
-        (elmo-message-buffer-match-condition condition number))))))
+       (when (file-exists-p arc)
+         (as-binary-process
+          (elmo-archive-call-method method args t))
+         (set-buffer-multibyte default-enable-multibyte-characters)
+         (decode-mime-charset-region (point-min)(point-max) elmo-mime-charset)
+         (elmo-message-buffer-match-condition condition number))))))
 
 (luna-define-method elmo-folder-search ((folder elmo-archive-folder)
                                        condition &optional from-msgs)
index a526fe4..58c0546 100644 (file)
@@ -738,6 +738,17 @@ Returns response value if selecting folder succeed. "
                         (format "Select %s failed" mailbox)))))))
       (and result response))))
 
+(defun elmo-imap4-session-unselect-mailbox (session mailbox)
+  "Unselect MAILBOX in SESSION.
+Deselecting will exit selected state without causing silent
+EXPUNGE for deleted messages."
+  (if (elmo-imap4-session-capable-p session 'unselect)
+      (elmo-imap4-send-command-wait session "unselect")
+    (elmo-imap4-send-command-wait
+     session
+     (list "examine " (elmo-imap4-mailbox mailbox)))
+    (elmo-imap4-send-command-wait session "close")))
+
 (defun elmo-imap4-check-validity (spec validity-file)
 ;;; Not used.
 ;;;(elmo-imap4-send-command-wait
@@ -939,12 +950,6 @@ If CHOP-LENGTH is not specified, message set is not chopped."
               (and (elmo-file-cache-exists-p msg-id)
                    '(cached)))
            saved-flags))
-    (when (and (or (memq 'important flag-list)
-                  (memq 'answered flag-list))
-              (memq 'unread flag-list))
-      (setq elmo-imap4-seen-messages
-           (cons (elmo-message-entity-number entity)
-                 elmo-imap4-seen-messages)))
     (elmo-msgdb-append-entity elmo-imap4-current-msgdb
                              entity
                              flag-list)))
@@ -1154,15 +1159,15 @@ If CHOP-LENGTH is not specified, message set is not chopped."
                       (if (sasl-step-data step)
                           (elmo-base64-encode-string (sasl-step-data step)
                                                      'no-line-break)
-                        "")))))))
+                        ""))))))))
 ;; Some servers return reduced capabilities when client asks for them
 ;; before login. It might be a good idea to ask them again, otherwise
 ;; we can miss some useful feature.
-        (elmo-imap4-session-set-capability-internal
-         session
-         (elmo-imap4-response-value
-          (elmo-imap4-send-command-wait session "capability")
-          'capability)))))))
+       (elmo-imap4-session-set-capability-internal
+        session
+        (elmo-imap4-response-value
+         (elmo-imap4-send-command-wait session "capability")
+         'capability))))))
 
 (luna-define-method elmo-network-setup-session ((session
                                                 elmo-imap4-session))
@@ -1314,7 +1319,7 @@ Return nil if no complete line has arrived."
       (while (setq end (elmo-imap4-find-next-line))
        (save-restriction
          (narrow-to-region (point-min) end)
-         (delete-backward-char (length elmo-imap4-server-eol))
+         (delete-char (- (length elmo-imap4-server-eol)))
          (goto-char (point-min))
          (unwind-protect
              (case elmo-imap4-status
@@ -1455,7 +1460,7 @@ Return nil if no complete line has arrived."
                                      ")"))))
           (ESEARCH     (list
                         'esearch
-                        (cddr (split-string (buffer-substring (point) (point-max)) " " "\,"))))
+                        (cddr (split-string (buffer-substring (point) (point-max)) " "))))
           (STATUS     (elmo-imap4-parse-status))
           ;; Added
           (NAMESPACE  (elmo-imap4-parse-namespace))
@@ -1663,7 +1668,7 @@ Return nil if no complete line has arrived."
                           (goto-char (match-end 1)))))
                   (UNSEEN
                    (list 'unseen (read (current-buffer))))
-                  (t 
+                  (t
                    (message
                     "Unknown status data %s in mailbox %s ignored"
                     token mailbox))))
@@ -1990,16 +1995,14 @@ Return nil if no complete line has arrived."
   (elmo-imap4-list
    folder
    (concat
-    (let ((killed
-          (elmo-folder-killed-list-internal
-           folder)))
+    (let ((killed (elmo-folder-killed-list-internal folder)))
       (if (and killed
-              (eq (length killed) 1)
-              (consp (car killed))
-              (eq (car (car killed)) 1))
-;; What about elmo-imap4-use-uid?
-         (format "uid %d:%s" (cdr (car killed)) max)
-       (format "uid %s:%s" min max)))
+              (eq (length killed) 1)
+              (consp (car killed))
+              (eq (car (car killed)) 1))
+         ;; What about elmo-imap4-use-uid?
+         (format "uid %d:%s" (cdr (car killed)) max)
+       (format "uid %s:%s" min max)))
     " undeleted")))
 
 (luna-define-method elmo-folder-list-messages-plugged
@@ -2180,6 +2183,9 @@ Return nil if no complete line has arrived."
     (elmo-imap4-session-select-mailbox session
                                       (elmo-imap4-folder-mailbox-internal
                                        folder))
+    (elmo-imap4-session-unselect-mailbox session
+                                        (elmo-imap4-folder-mailbox-internal
+                                         folder))
     (elmo-imap4-send-command-wait session "close")
     (elmo-imap4-send-command-wait
      session
index 9651f8a..78a30f1 100644 (file)
       (dolist (old-number numbers)
        (setq entity (elmo-msgdb-message-entity msgdb old-number))
        (when (not (eq old-number new-number)) ; why \=() is wrong..
-         (elmo-bind-directory
-          dir
-          ;; xxx  nfs,hardlink
-          (rename-file (number-to-string old-number)
-                       (number-to-string new-number) t))
+         (elmo-bind-directory dir
+           ;; xxx  nfs,hardlink
+           (rename-file (number-to-string old-number)
+                        (number-to-string new-number) t))
          (elmo-message-entity-set-number entity new-number))
        (elmo-msgdb-append-entity new-msgdb entity
                                  (elmo-msgdb-flags msgdb old-number))
index 0ba69ff..383124a 100644 (file)
@@ -227,7 +227,8 @@ Return new location alist."
     (elmo-folder-set-msgdb-internal folder new-msgdb)))
 
 (luna-define-method elmo-folder-open-internal ((folder elmo-map-folder))
-  (elmo-location-map-load folder (elmo-folder-msgdb-path folder))
+  (unless (elmo-location-map-alist folder)
+    (elmo-location-map-load folder (elmo-folder-msgdb-path folder)))
   (when (elmo-folder-plugged-p folder)
     (elmo-location-map-update
      folder
index 9e57d86..6a05ec0 100644 (file)
@@ -766,7 +766,7 @@ Don't cache if nil.")
        (session (elmo-nntp-get-session folder))
        (new-msgdb (elmo-make-msgdb))
        beg-num end-num cur length
-       new-msgdb ov-str use-xover dir)
+       ov-str use-xover dir)
     (elmo-nntp-select-group session (elmo-nntp-folder-group-internal
                                     folder))
     (when (setq use-xover (elmo-nntp-xover-p session))
index ac755f3..07555c6 100644 (file)
@@ -228,7 +228,8 @@ CODE is one of the following:
          (goto-char elmo-pop3-read-point))
        (setq match-end (point))
        (setq response-string
-             (buffer-substring elmo-pop3-read-point (- match-end 2)))
+             (buffer-substring elmo-pop3-read-point
+                               (max (- match-end 2) elmo-pop3-read-point)))
        (goto-char elmo-pop3-read-point)
        (if (looking-at "\\+.*$")
            (progn
@@ -785,8 +786,9 @@ until the login delay period has expired"))
       t)))
 
 (luna-define-method elmo-folder-open-internal ((folder elmo-pop3-folder))
-  (when (elmo-pop3-folder-use-uidl folder)
-    (elmo-location-map-load folder (elmo-folder-msgdb-path folder))))
+  (unless (elmo-location-map-alist folder)
+    (when (elmo-pop3-folder-use-uidl folder)
+      (elmo-location-map-load folder (elmo-folder-msgdb-path folder)))))
 
 (luna-define-method elmo-folder-commit :after ((folder elmo-pop3-folder))
   (when (and (not elmo-inhibit-number-mapping)
index af9664f..aff84f3 100644 (file)
@@ -417,14 +417,14 @@ Return value is a cons cell of (STRUCTURE . REST)"
 (defsubst elmo-delete-char (char string &optional unibyte)
   (save-match-data
     (elmo-set-work-buf
-     (let ((coding-system-for-read 'no-conversion)
-          (coding-system-for-write 'no-conversion))
-       (if unibyte (set-buffer-multibyte nil))
-       (insert string)
-       (goto-char (point-min))
-       (while (search-forward (char-to-string char) nil t)
-        (replace-match ""))
-       (buffer-string)))))
+      (let ((coding-system-for-read 'no-conversion)
+           (coding-system-for-write 'no-conversion))
+       (if unibyte (set-buffer-multibyte nil))
+       (insert string)
+       (goto-char (point-min))
+       (while (search-forward (char-to-string char) nil t)
+         (replace-match ""))
+       (buffer-string)))))
 
 (defsubst elmo-delete-cr-buffer ()
   "Delete CR from buffer."
@@ -445,11 +445,11 @@ Return value is a cons cell of (STRUCTURE . REST)"
 (defun elmo-delete-cr (string)
   (save-match-data
     (elmo-set-work-buf
-     (insert string)
-     (goto-char (point-min))
-     (while (search-forward "\r\n" nil t)
-       (replace-match "\n"))
-     (buffer-string))))
+      (insert string)
+      (goto-char (point-min))
+      (while (search-forward "\r\n" nil t)
+       (replace-match "\n"))
+      (buffer-string))))
 
 (defun elmo-last (list)
   (and list (nth (1- (length list)) list)))
@@ -499,26 +499,26 @@ Return value is a cons cell of (STRUCTURE . REST)"
 
 (defun elmo-get-file-string (filename &optional remove-final-newline)
   (elmo-set-work-buf
-   (let (insert-file-contents-pre-hook   ; To avoid autoconv-xmas...
-        insert-file-contents-post-hook)
-     (when (file-exists-p filename)
-       (if filename
-          (as-binary-input-file (insert-file-contents filename)))
-       (when (and remove-final-newline
-                 (> (buffer-size) 0)
-                 (= (char-after (1- (point-max))) ?\n))
-        (goto-char (point-max))
-        (delete-backward-char 1))
-       (buffer-string)))))
+    (let (insert-file-contents-pre-hook        ; To avoid autoconv-xmas...
+         insert-file-contents-post-hook)
+      (when (file-exists-p filename)
+       (if filename
+           (as-binary-input-file (insert-file-contents filename)))
+       (when (and remove-final-newline
+                  (> (buffer-size) 0)
+                  (= (char-after (1- (point-max))) ?\n))
+         (goto-char (point-max))
+         (delete-char -1))
+       (buffer-string)))))
 
 (defun elmo-save-string (string filename)
   (if string
       (elmo-set-work-buf
-       (as-binary-output-file
-       (insert string)
-       (write-region (point-min) (point-max)
-                     filename nil 'no-msg))
-       )))
+       (as-binary-output-file
+        (insert string)
+        (write-region (point-min) (point-max)
+                      filename nil 'no-msg))
+       )))
 
 (defun elmo-max-of-list (nlist)
   (let ((l nlist)
@@ -664,13 +664,13 @@ Return value is a cons cell of (STRUCTURE . REST)"
 
 (defun elmo-string-to-list (string)
   (elmo-set-work-buf
-   (insert string)
-   (goto-char (point-min))
-   (insert "(")
-   (goto-char (point-max))
-   (insert ")")
-   (goto-char (point-min))
-   (read (current-buffer))))
+    (insert string)
+    (goto-char (point-min))
+    (insert "(")
+    (goto-char (point-max))
+    (insert ")")
+    (goto-char (point-min))
+    (read (current-buffer))))
 
 (defun elmo-list-to-string (list)
   (let ((tlist list)
@@ -2226,13 +2226,13 @@ If ALIST is nil, `elmo-obsolete-variable-alist' is used."
       (save-match-data
        (let (beg)
          (elmo-set-work-buf
-          (insert string)
-          (goto-char (point-max))
-          (when (search-backward "<" nil t)
-            (setq beg (point))
-            (if (search-forward ">" nil t)
-                (elmo-replace-in-string
-                 (buffer-substring beg (point)) "\n[ \t]*" ""))))))))
+           (insert string)
+           (goto-char (point-max))
+           (when (search-backward "<" nil t)
+             (setq beg (point))
+             (if (search-forward ">" nil t)
+                 (elmo-replace-in-string
+                  (buffer-substring beg (point)) "\n[ \t]*" ""))))))))
 
 (defun elmo-msgdb-get-message-id-from-buffer ()
   (let ((msgid (elmo-field-body "message-id")))
index 15c935e..3b3e707 100644 (file)
@@ -1188,7 +1188,7 @@ Returns a list of message numbers successfully appended."
          (error "move: %d is not writable"
                 (elmo-folder-name-internal dst-folder)))
        (when messages
-         ;; src is already opened.
+         (elmo-folder-open-internal src-folder)
          (elmo-folder-open-internal dst-folder)
          (unless (setq succeeds (elmo-folder-append-messages dst-folder
                                                              src-folder
index 30fdb74..dd38408 100644 (file)
@@ -136,7 +136,7 @@ Use IMAP modification if FOR-IMAP is non-nil."
                 (skip-chars-forward not-direct-encoding-chars)))
            (if (and (= fc esc-char)
                     (= run-length 1))  ; Lone esc-char?
-               (delete-backward-char 1) ; Now there's one too many
+               (delete-char -1)        ; Now there's one too many
              (utf7-fragment-encode p (point) for-imap))
            (insert "-")))))))
 
@@ -185,7 +185,7 @@ Use IMAP modification if FOR-IMAP is non-nil."
              (save-excursion
                (utf7-fragment-decode p (point) for-imap)
                (goto-char p)
-               (delete-backward-char 1)))))))))
+               (delete-char -1)))))))))
 
 (defun utf7-fragment-decode (start end &optional for-imap)
   "Decode base64 encoded fragment from START to END of UTF-7 text in buffer.
index e2999bd..1919168 100644 (file)
@@ -1,3 +1,33 @@
+2011-05-30  TAKAHASHI Kaoru  <kaoru@kaisei.org>
+
+       * test-wl-address.el: New file.
+
+2011-04-07  TAKAHASHI Kaoru  <kaoru@kaisei.org>
+
+       * test-elmo-date.el: Add `lexical-binding' file variable.
+       * test-elmo-imap4.el: Ditto.
+       * test-elmo-localdir.el: Ditto.
+       * test-elmo-util.el: Ditto.
+       * test-rfc2368.el: Ditto.
+       * test-utf7.el: Ditto.
+       * test-wl-draft.el: Ditto.
+       * test-wl-util.el: Ditto.
+
+2011-04-06  TAKAHASHI Kaoru  <kaoru@kaisei.org>
+
+       * test-dist.el: Add `lexical-binding' file variable.
+       (test-wl-modules-trailing-whitespace, test-elmo-modules-exists)
+       (test-elmo-modules-trailing-whitespace)
+       (test-util-modules-exists)
+       (test-util-modules-trailing-whitespace, test-wl-icon-exists): Fix
+       let style for `lexical-binding'.
+
+2010-08-31  TAKAHASHI Kaoru  <kaoru@kaisei.org>
+
+       * test-dist.el (test-elmo-modules-trailing-whitespace)
+       (test-util-modules-trailing-whitespace)
+       (test-wl-modules-trailing-whitespace): New testcases.
+
 2010-01-22  TAKAHASHI Kaoru  <kaoru@kaisei.org>
 
        * test-utf7.el (test-utf7-encode-string-alpha): Fix indent.
index 432500e..5619f0b 100644 (file)
@@ -1,3 +1,4 @@
+;; -*- lexical-binding: t -*-
 (require 'lunit)
 (require 'wl)
 (require 'cl)                          ; mapc
@@ -5,59 +6,98 @@
 (luna-define-class test-dist (lunit-test-case))
 
 ;; WL-MODULES
+(defvar test-dist-wl-lost-module-list nil)
 (luna-define-method test-wl-modules-exists ((case test-dist))
-  (lunit-assert
-   (null
-    (let (filename lost)
-      (mapc
-       (lambda (module)
-        (setq filename (concat (symbol-name module) ".el"))
-        (unless (file-exists-p (expand-file-name filename WLDIR))
-          (add-to-list 'lost filename)))
-       WL-MODULES)
-      lost))))
+  (setq test-dist-wl-lost-module nil)
+  (mapc
+   (lambda (module)
+     (let ((filename (concat (symbol-name module) ".el")))
+       (unless (file-exists-p (expand-file-name filename WLDIR))
+        (add-to-list 'test-dist-wl-lost-module-list filename))))
+   WL-MODULES)
+  (lunit-assert (null test-dist-wl-lost-module-list)))
+
+(defvar test-dist-wl-bad-module-list nil)
+(luna-define-method test-wl-modules-trailing-whitespace ((case test-dist))
+  (setq test-dist-wl-bad-module-list nil)
+  (mapc
+   (lambda (module)
+     (let ((filename (format "%s.el%s" (symbol-name module)
+                            (if (eq 'wl-news module) ".in" ""))))
+       (with-temp-buffer
+        (insert-file-contents (expand-file-name filename WLDIR))
+        (when (re-search-forward "[ \t]$" nil t)
+          (add-to-list 'test-dist-wl-bad-module-list filename)))))
+   WL-MODULES)
+  (lunit-assert (null test-dist-wl-bad-module-list)))
+
 
 ;; ELMO-MODULES
+(defvar test-dist-elmo-lost-module-list nil)
 (luna-define-method test-elmo-modules-exists ((case test-dist))
-  (lunit-assert
-   (null
-    (let (filename lost)
-      (mapc
-       (lambda (module)
-        (setq filename (concat (symbol-name module) ".el"))
-        (unless (file-exists-p (expand-file-name filename ELMODIR))
-          (add-to-list 'lost filename)))
-       ELMO-MODULES)
-      lost))))
+  (setq test-dist-elmo-lost-module-list nil)
+  (mapc
+   (lambda (module)
+     (let ((filename (concat (symbol-name module) ".el")))
+       (unless (file-exists-p (expand-file-name filename ELMODIR))
+        (add-to-list 'test-dist-elmo-lost-module-list filename))))
+   ELMO-MODULES)
+  (lunit-assert (null test-dist-elmo-lost-module-list)))
+
+(defvar test-dist-elmo-bad-module-list nil)
+(luna-define-method test-elmo-modules-trailing-whitespace ((case test-dist))
+  (setq test-dist-elmo-bad-module-list nil)
+  (mapc
+   (lambda (module)
+     (let ((filename (format "%s.el" (symbol-name module))))
+       (with-temp-buffer
+        (insert-file-contents (expand-file-name filename ELMODIR))
+        (when (re-search-forward "[ \t]$" nil t)
+          (add-to-list 'test-dist-elmo-bad-module-list filename)))))
+   ELMO-MODULES)
+  (lunit-assert (null test-dist-elmo-bad-module-list)))
+
 
 ;; UTILS-MODULES
+(defvar test-dist-util-lost-module-list nil)
 (luna-define-method test-util-modules-exists ((case test-dist))
-  (lunit-assert
-   (null
-    (let (filename lost)
-      (mapc
-       (lambda (module)
-        (setq filename (concat (symbol-name module) ".el"))
-        (unless (file-exists-p (expand-file-name filename UTILSDIR))
-          (add-to-list 'lost symbol)))
-       UTILS-MODULES)
-      lost))))
+  (setq test-dist-util-lost-module-list nil)
+  (mapc
+   (lambda (module)
+     (let ((filename (concat (symbol-name module) ".el")))
+       (unless (file-exists-p (expand-file-name filename UTILSDIR))
+        (add-to-list 'test-dist-util-lost-module-list symbol))))
+   UTILS-MODULES)
+  (lunit-assert (null test-dist-util-lost-module-list)))
+
+(defvar test-dist-util-bad-module-list nil)
+(luna-define-method test-util-modules-trailing-whitespace ((case test-dist))
+  (setq test-dist-util-bad-module-list nil)
+  (mapc
+   (lambda (module)
+     (let ((filename (format "%s.el" (symbol-name module))))
+       (with-temp-buffer
+        (insert-file-contents (expand-file-name filename UTILSDIR))
+        (when (re-search-forward "[ \t]$" nil t)
+          (add-to-list 'test-dist-util-bad-module-list filename)))))
+   UTILS-MODULES)
+  (lunit-assert (null test-dist-util-bad-module-list)))
+
 
 ;; Icons
+(defvar test-dist-wl-lost-icon-list nil)
 (luna-define-method test-wl-icon-exists ((case test-dist))
-  (lunit-assert
-   (null
-    (let (name value lost)
-      (mapatoms
-       (lambda (symbol)
-        (setq name (symbol-name symbol))
-        (setq value (and (boundp symbol) (symbol-value symbol)))
-        (when (and (string-match "^wl-.*-icon$" name)
-                   (stringp value)
-                   (string-match "xpm$" value))
-          (unless (file-exists-p (expand-file-name value ICONDIR))
-            (add-to-list 'lost symbol)))))
-      lost))))
+  (setq test-dist-wl-lost-icon-list nil)
+  (mapatoms
+   (lambda (symbol)
+     (let ((name (symbol-name symbol))
+          (value (and (boundp symbol) (symbol-value symbol))))
+       (when (and (string-match "^wl-.*-icon$" name)
+                 (stringp value)
+                 (string-match "xpm$" value))
+        (unless (file-exists-p (expand-file-name value ICONDIR))
+          (add-to-list 'test-dist-wl-lost-icon-list symbol))))))
+  (lunit-assert (null test-dist-wl-lost-icon-list)))
 
 (luna-define-method test-version-status-icon-xpm ((case test-dist))
   (require 'wl-demo)
index 1808eb0..04d7814 100644 (file)
@@ -1,3 +1,4 @@
+;; -*- lexical-binding: t -*-
 (require 'lunit)
 (require 'elmo-date)
 
index bbb824e..0df25f9 100644 (file)
@@ -1,3 +1,4 @@
+;; -*- lexical-binding: t -*-
 (require 'lunit)
 (require 'elmo-imap4)
 
index b3eb877..27a5aa7 100644 (file)
@@ -1,3 +1,4 @@
+;; -*- lexical-binding: t -*-
 (require 'lunit)
 (require 'elmo-localdir)
 
index 01e178f..6c0c6b8 100644 (file)
@@ -1,3 +1,4 @@
+;; -*- lexical-binding: t -*-
 (require 'lunit)
 (require 'elmo-util)
 
index 763ced2..6cf96e6 100644 (file)
@@ -1,3 +1,4 @@
+;; -*- lexical-binding: t -*-
 (require 'lunit)
 (require 'rfc2368)
 
index 80cb839..43d3f15 100644 (file)
@@ -1,3 +1,4 @@
+;; -*- lexical-binding: t -*-
 (require 'lunit)
 
 ;; Emacs 21
diff --git a/tests/test-wl-address.el b/tests/test-wl-address.el
new file mode 100644 (file)
index 0000000..1e2418f
--- /dev/null
@@ -0,0 +1,19 @@
+;; -*- lexical-binding: t -*-
+(require 'lunit)
+(require 'wl-address)
+
+(luna-define-class test-wl-address (lunit-test-case))
+
+(luna-define-method test-wl-address-header-extract-address-1 ((case test-wl-address))
+  (lunit-assert
+   (string=
+    "m-sakura@example.org"
+    (wl-address-header-extract-address "Mine Sakurai <m-sakura@example.org>")
+    )))
+
+(luna-define-method test-wl-address-header-extract-address-2 ((case test-wl-address))
+  (lunit-assert
+   (string=
+    "m-sakura@example.org"
+    (wl-address-header-extract-address "m-sakura@example.org (Mine Sakurai)")
+    )))
index fb48574..fe71d6e 100644 (file)
@@ -1,3 +1,4 @@
+;; -*- lexical-binding: t -*-
 (require 'lunit)
 (require 'wl-draft)
 
index 1efc1bf..f833485 100644 (file)
@@ -1,3 +1,4 @@
+;; -*- lexical-binding: t -*-
 (require 'lunit)
 (require 'wl-util)
 
index d0f205a..c27dd04 100644 (file)
@@ -1,3 +1,39 @@
+2011-04-20  TAKAHASHI Kaoru  <kaoru@kaisei.org>
+
+       * ptexinfmt.el: Fix description comment style.
+
+2011-04-13  TAKAHASHI Kaoru  <kaoru@kaisei.org>
+
+       * ptexinfmt.el: Use lexical binding.
+       (ptexinfmt-broken-facility): Rename _dummy argument.
+       (texinfo-enclosure-list, texinfo-alias-list): Add defvar stub for
+       lexical binding.
+
+2010-09-02  TAKAHASHI Kaoru  <kaoru@kaisei.org>
+
+       * ptexinfmt.el (texinfo-multitable-widths): Use `make-char'
+       instead of KANJI literal.
+
+2010-08-31  TAKAHASHI Kaoru  <kaoru@kaisei.org>
+
+       * wl-addrbook.el: Delete traing whitespace.
+       * wl-complete.el: Ditto.
+       * rfc2368.el: Ditto.
+       * ssl.el: Ditto.
+
+2010-08-24  TAKAHASHI Kaoru  <kaoru@kaisei.org>
+
+       * ptexinfmt.el (texinfo-format-verb): Use (delete-char -1)
+        instead of (delete-backward-char 1); For Emacs24.
+
+       * wl-addrbook.el (wl-addrbook-insert-file): Use (delete-char -1)
+       instead of (delete-backward-char 1) or (backward-deletechar 1).
+
+2010-08-04  David Maus  <dmaus@ictsoc.de>
+
+       * ssl.el (open-ssl-stream, condition-case): Don't use old-style
+       backquotes.
+
 2010-01-06  TAKAHASHI Kaoru  <kaoru@kaisei.org>
 
        * wl-addrbook.el (wl-summary-addrbook-add): Use
index 4c193e8..2875efb 100644 (file)
@@ -1,4 +1,4 @@
-;;; ptexinfmt.el -- portable Texinfo formatter.
+;;; ptexinfmt.el --- portable Texinfo formatter  -*- lexical-binding: t -*-
 
 ;; Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993,
 ;;               1994, 1995, 1996, 1997 Free Software Foundation, Inc.
@@ -69,7 +69,7 @@ This is last argument in `ptexinfmt-broken-facility'.")
 
 (put 'ptexinfmt-broken-facility 'lisp-indent-function 'defun)
 (defmacro ptexinfmt-broken-facility (facility docstring assertion
-                                             &optional dummy)
+                                             &optional _dummy)
   "Declare a symbol FACILITY is broken if ASSERTION is nil.
 DOCSTRING will be printed if ASSERTION is nil and
 `ptexinfmt-disable-broken-notice-flag' is nil."
@@ -129,6 +129,8 @@ DOCSTRING will be printed if ASSERTION is nil and
     t))
 
 ;; @var{METASYNTACTIC-VARIABLE}
+(defvar texinfo-enclosure-list)
+(defvar texinfo-alias-list)
 (ptexinfmt-broken-facility texinfo-format-var
   "Don't perse @var argument."
   (condition-case nil
@@ -170,7 +172,10 @@ DOCSTRING will be printed if ASSERTION is nil and
   "`texinfo-multitable-widths' unsupport wide-char."
   (if (fboundp 'texinfo-multitable-widths)
       (with-temp-buffer
-       (let ((str "\e$BI}9-J8;z\e(B"))
+       (let ((str (string (make-char 'japanese-jisx0208 73 125)
+                          (make-char 'japanese-jisx0208 57 45)
+                          (make-char 'japanese-jisx0208 74 56)
+                          (make-char 'japanese-jisx0208 59 122))))
          (texinfo-mode)
          (insert (format " {%s}\n" str))
          (goto-char (point-min))
@@ -409,7 +414,7 @@ For example, @verb\{|@|\} results in @ and
       (error "Not found: @verb start brace"))
     (delete-region texinfo-command-start (+ 2 texinfo-command-end))
     (search-forward  delimiter))
-  (delete-backward-char 1)
+  (delete-char -1)
   (unless (looking-at "}")
     (error "Not found: @verb end brace"))
   (delete-char 1))
index abca6ed..a2ab61e 100644 (file)
@@ -89,7 +89,7 @@
             ((match-beginning 1) "\n")
             (t " "))
            buf)
-      (setq start (match-end 0)))  
+      (setq start (match-end 0)))
     (apply 'concat (nreverse (cons (substring string start) buf)))))
 
 (defun rfc2368-parse-mailto-url (mailto-url)
index 0b74cd0..7006955 100644 (file)
     ;; We have the old custom-library, hack around it!
     (defmacro defgroup (&rest args)
       nil)
-    (defmacro defcustom (var value doc &rest args) 
-      (` (defvar (, var) (, value) (, doc))))))
+    (defmacro defcustom (var value doc &rest args)
+      `(devar ,var ,value ,doc))))
 
 (defgroup ssl nil
   "Support for `Secure Sockets Layer' encryption."
   :group 'comm)
-  
+
 (defcustom ssl-certificate-directory "~/.w3/certs/"
   "*Directory to store CA certificates in"
   :group 'ssl
@@ -134,7 +134,7 @@ to."
          (while (re-search-forward "^\\([^=\n\r]+\\)\\s *=\\s *\\(.*\\)" nil t)
            (push (cons (match-string 1) (match-string 2)) vals))
          vals)))))
-  
+
 (defun ssl-accept-ca-certificate ()
   "Ask if the user is willing to accept a new CA certificate. The buffer-name
 should be the intended name of the certificate, and the buffer should probably
@@ -143,10 +143,10 @@ be in DER encoding"
   (let* ((process-connection-type nil)
         (tmpbuf (generate-new-buffer "X509 CA Certificate Information"))
         (response (save-excursion
-                    (and (eq 0 
+                    (and (eq 0
                              (apply 'call-process-region
-                                    (point-min) (point-max) 
-                                    ssl-view-certificate-program-name 
+                                    (point-min) (point-max)
+                                    ssl-view-certificate-program-name
                                     nil tmpbuf t
                                     ssl-view-certificate-program-arguments))
                          (switch-to-buffer tmpbuf)
@@ -192,9 +192,8 @@ specifying a port number to connect to."
   (let* ((process-connection-type nil)
         (port service)
         (proc (eval
-               (`
-                (start-process name buffer ssl-program-name
-                               (,@ ssl-program-arguments))))))
+               `(start-process name buffer ssl-program-name
+                               ,@ssl-program-arguments))))
     (process-kill-without-query proc)
     proc))
 
index b553230..e03b94b 100644 (file)
@@ -26,7 +26,7 @@
   "*Regular expression for \".im/Addrbook\".")
 (defvar wl-addrbook-override-by-newone t
   "If non-nil, the 'user' entry in 'wl-alias-auto-alist'
-is override by a new entry of (user different-address). 
+is override by a new entry of (user different-address).
 This means that addresses in To: and Cc: in Draft mode are
 always learned with an exception 'user' is defined in Addrbook.
 If nil,  the old 'user' entry remains.")
@@ -242,7 +242,7 @@ If addresses is a string, expands it recursively."
            (setq wl-alias-auto-alist
                  (cons (list user addr)
                        (delete match-auto wl-alias-auto-alist))))
-          (t 
+          (t
            ;; the old entry remains
            )))
         (match-adbk
@@ -310,7 +310,7 @@ If addresses is a string, expands it recursively."
     (while (re-search-forward ",[ \t]*$" nil t)
       (end-of-line)
       (forward-char 1)
-      (delete-backward-char 1)
+      (delete-char -1)
       (delete-horizontal-space))
     ;; unquote, replace white spaces to "\0".
     (if unquote
@@ -319,11 +319,11 @@ If addresses is a string, expands it recursively."
          (while (re-search-forward "[\"']" nil t)
            (setq qchar (char-before (point)))
            ;; (point) is for backward compatibility
-           (backward-delete-char 1) ;; delete quote
+           (delete-char -1)            ; delete quote
            (setq beg (point))
            (if (not (re-search-forward (char-to-string qchar) nil t))
                (throw 'quote nil) ;; error
-             (backward-delete-char 1) ;; delete quote
+             (delete-char -1)     ; delete quote
              (save-restriction
                (narrow-to-region beg (point))
                (goto-char (point-min))
@@ -365,7 +365,7 @@ If addresses is a string, expands it recursively."
 
 (defun wl-draft-learn-alias ()
   (interactive)
-  (let ((recipients (mapconcat 'identity 
+  (let ((recipients (mapconcat 'identity
                               (delq nil (std11-field-bodies '("To" "Cc")))
                               ",")))
     (mapcar '(lambda (addr)
@@ -502,7 +502,7 @@ The keys that are defined for this mode are:
         (set-buffer buf)
         (goto-char (point-min))
         (if (and shortname
-                 (re-search-forward 
+                 (re-search-forward
                   (concat "^" (regexp-quote shortname) "[ \t]*:?[ \t]+") nil t))
             (setq not-uniq t))
         (if not-uniq
@@ -568,7 +568,7 @@ The keys that are defined for this mode are:
 ;; Redistribution and use in source and binary forms, with or without
 ;; modification, are permitted provided that the following conditions
 ;; are met:
-;; 
+;;
 ;; 1. Redistributions of source code must retain the above copyright
 ;;    notice, this list of conditions and the following disclaimer.
 ;; 2. Redistributions in binary form must reproduce the above copyright
@@ -577,7 +577,7 @@ The keys that are defined for this mode are:
 ;; 3. Neither the name of the team nor the names of its contributors
 ;;    may be used to endorse or promote products derived from this software
 ;;    without specific prior written permission.
-;; 
+;;
 ;; THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND
 ;; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 ;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
index 70dfc68..b44afe7 100644 (file)
       (wl-complete word wl-folder-entity-hashtb "folder" nil))))
 
 (defun wl-addrbook-complete-address ()
-  "Complete and expand address aliases. 
+  "Complete and expand address aliases.
 First alias key is completed. When completed solely or the @ character
 is inserted before the cursor, the alias key is expanded to its value."
   (interactive)
@@ -134,7 +134,7 @@ is inserted before the cursor, the alias key is expanded to its value."
          (insert (or (wl-alias-next word) word))
        (wl-complete
         word wl-addrbook-alist "alias" ?@ nil nil
-        (function wl-addrbook-alias-get) 
+        (function wl-addrbook-alias-get)
         (function wl-addrbook-alias-hit))))))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -153,8 +153,8 @@ is inserted before the cursor, the alias key is expanded to its value."
 (defun wl-circular-complete-domain ()
   "Circular completion of domains for To:, Cc:, etc.
 If the @ character does not exist, the first value of
-wl-mail-domain-list is inserted. If exists, the next value of 
-wl-mail-domain-list concerned with the string between @ and 
+wl-mail-domain-list is inserted. If exists, the next value of
+wl-mail-domain-list concerned with the string between @ and
 the cursor is inserted."
   (interactive)
   (let ((word (wl-delete-backward-char "@")))
@@ -350,7 +350,7 @@ the name exists."
 (defun wl-slide-pair (x)
   (let ((ret nil)
        (first (car x)))
-    (cond 
+    (cond
      ((eq x 0) nil)
      ((eq x 1) (cons first first))
      (t
@@ -371,7 +371,7 @@ the name exists."
 ;; Redistribution and use in source and binary forms, with or without
 ;; modification, are permitted provided that the following conditions
 ;; are met:
-;; 
+;;
 ;; 1. Redistributions of source code must retain the above copyright
 ;;    notice, this list of conditions and the following disclaimer.
 ;; 2. Redistributions in binary form must reproduce the above copyright
@@ -380,7 +380,7 @@ the name exists."
 ;; 3. Neither the name of the team nor the names of its contributors
 ;;    may be used to endorse or promote products derived from this software
 ;;    without specific prior written permission.
-;; 
+;;
 ;; THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND
 ;; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 ;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
index d3ad732..9cb66e4 100644 (file)
@@ -1,3 +1,95 @@
+2011-06-03  Erik Hetzner  <egh@e6h.org>
+
+       * wl-vars.el (wl-summary-line-format): Document missing control
+       strings.
+
+2011-01-30  TAKAHASHI Kaoru  <kaoru@kaisei.org>
+
+       * wl-demo.el (wl-demo-copyright-notice): Add 2011.
+
+2011-01-29  David Maus  <dmaus@ictsoc.de>
+
+       * wl-draft.el (wl-user-agent-compose): Add optional argument
+       RETURN-ACTION, introduced to `compose-mail' in Emacs 24.
+
+2011-01-09  David Maus  <dmaus@ictsoc.de>
+
+       * wl-template.el (wl-template-select): Reset draft config exec
+       flag when selecting template.
+
+2010-10-18  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * wl-summary.el (wl-summary-mode): Check with fboundp before calling `make-local-hook'.
+       * wl-mime.el (wl-draft-preview-message): Ditto.
+
+2010-09-18  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * wl-demo.el: Prune functions provided temporarily to avoid
+       compile warnings in the end.
+
+2010-09-08  Tetsurou Okazaki  <okazaki@be.to>
+
+       * wl-spam.el (wl-spam-register-spam-messages): Put spam mark on
+       the registered messages unless specified folder is a spam folder.
+       Add docstring.
+       (wl-spam-register-good-messages): Remove spam mark from
+       the registered messages.  Add docstring.
+       (wl-summary-register-as-spam)
+       (wl-summary-register-as-spam-region, wl-thread-register-as-spam)
+       (wl-summary-register-as-spam-all)
+       (wl-summary-target-mark-register-as-spam)
+       (wl-summary-register-as-good)
+       (wl-summary-register-as-good-region, wl-thread-register-as-good)
+       (wl-summary-register-as-good-all)
+       (wl-summary-target-mark-register-as-good): Add docstring.
+
+2010-08-31  TAKAHASHI Kaoru  <kaoru@kaisei.org>
+
+       * wl-summary.el: Delete trailing whitespace.
+
+2010-08-27  Kenichi Okada  <okada@opaopa.org>
+
+       * wl-summary.el (wl-summary-prefetch-msg): Make the confirmation
+       message human-readable.
+
+2010-08-26  TAKAHASHI Kaoru  <kaoru@kaisei.org>
+
+       * wl-e21.el (wl-draft-insert-signature): Fix comment style.
+       (wl-highlight-folder-current-line): Ditto.
+       * wl-xmas.el (wl-draft-insert-signature): Ditto.
+       (wl-highlight-folder-current-line): Ditto.
+
+2010-08-24  TAKAHASHI Kaoru  <kaoru@kaisei.org>
+
+       * wl-address.el (wl-address-make-alist-from-alias-file): Use
+       `(delete-char -1)' instead of `(delete-backward-char 1)' that
+       deletes region in Emacs 24.
+       See delete-active-region described in NEWS.
+       * wl-draft.el (wl-draft-insert-mail-header-separator): Ditto.
+       * wl-summary.el (wl-summary-update-persistent-mark): Ditto.
+
+2010-08-14  David Maus  <dmaus@ictsoc.de>
+
+       * wl-summary.el (wl-summary-mode-menu-spec): Add menu option to
+       edit draft message when in draft folder.
+
+2010-07-21  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * wl-summary.el (wl-summary-put-temp-mark): Use (delete-char -1)
+       instead of (delete-backward-char 1) that deletes region in Emacs 24.
+       See delete-active-region described in NEWS.
+
+2010-05-25  Tetsurou Okazaki  <okazaki@be.to>
+
+       * wl-spam.el (wl-summary-register-as-spam-region)
+       (wl-thread-register-as-spam, wl-summary-register-as-good-region)
+       (wl-thread-register-as-good): New functions.
+       (wl-spam-setup): Bind "rks", "rkn", "tks" and "tkn".
+
+2010-04-28  Vitaly Mayatskikh  <v.mayatskih@gmail.com>
+       * wl-e21.el (wl-e21-setup-toolbar): Don't define vector with
+       images for the icon if there is only one image.
+
 2010-03-17  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * wl-draft.el (wl-user-agent-insert-body): Make sure body ends with
 
 2004-12-11  Yuuichi Teranishi  <teranisi@gohome.org>
 
-       * wl-mime.el (wl-draft-yank-current-message-entity): 
+       * wl-mime.el (wl-draft-yank-current-message-entity):
        Switch to no-mime following method according to wl-message-display-type
        property.
        (wl-mime-preview-follow-no-mime): Use wl-message-mime-analysis-p.
 
-       * wl-message.el (wl-message-display-internal): 
+       * wl-message.el (wl-message-display-internal):
        Put wl-message-display-type property on message buffer.
 
        * wl-message.el (wl-message-mime-analysis-p): Fixed misspelling.
 
 2004-09-29  Yuuichi Teranishi  <teranisi@gohome.org>
 
-       * wl-summary.el (wl-summary-overview-entity-compare-by-from): 
+       * wl-summary.el (wl-summary-overview-entity-compare-by-from):
        Don't extract mail address.
        (wl-summary-mark-as-read-all): Dont' treat `read' flag.
 
        Add an argument `reverse'.  All callers are updated.
        (wl-summary-sort): Add a prefix argument `reverse' to specify
        reverse sorting.
-       (wl-summary-sort-by-date, wl-summary-sort-by-number) 
-       (wl-summary-sort-by-subject, wl-summary-sort-by-from) 
+       (wl-summary-sort-by-date, wl-summary-sort-by-number)
+       (wl-summary-sort-by-subject, wl-summary-sort-by-from)
        (wl-summary-sort-by-list-info, wl-summary-sort-by-size): Likewise.
 
 2004-09-08  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
        * wl-summary.el (wl-summary-decide-flag): Use
        wl-completing-read-multiple instead of completing-read-multiple.
 
-       * wl-mule.el,wl-e21.el,wl-xmas.el (wl-completing-read-multiple): 
+       * wl-mule.el,wl-e21.el,wl-xmas.el (wl-completing-read-multiple):
        New alias.
 
        * wl-demo.el (wl-demo-setup-properties)[XEmacs]:
 
        * wl-summary.el: Define `elmo-global-flag-list' to avoid byte-compile
        warning.
-       (wl-summary-mode-menu-spec): Follow the change of 
+       (wl-summary-mode-menu-spec): Follow the change of
        `wl-summary-mark-as-important', `wl-thread-set-flags', and so on.
        (wl-summary-mode-map): Follow the change of
        `wl-summary-mark-as-important', `wl-thread-set-flags', and so on.
        instead of elmo-message-flagged-p.
        (wl-summary-persistent-mark-string): Follow the variable name change;
        Put wl-summary-flag-mark if the message has global-flag.
-       (wl-summary-target-mark-set-flags): Renamed from 
+       (wl-summary-target-mark-set-flags): Renamed from
        wl-summary-target-mark-mark-as-important.
        (wl-summary-decide-flag): New function.
        (wl-summary-set-flags-internal): Renamed from
        (wl-summary-next-message): List flagged messages in the msgdb.
 
        * wl-score.el (wl-summary-score-update-all-lines): Use
-       wl-summary-add-flags-internal instead of 
+       wl-summary-add-flags-internal instead of
 
        * wl-mime.el (wl-mime-display-header): Follow the variable name change.
 
        (wl-demo-setup-properties): Renamed from
        `wl-demo-set-background-color'.
        (wl-demo): Follow the change above.
-       
+
        * Version number is increased to 2.11.24.
 
 2004-02-06  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
        (wl-draft-reedit): Rewrite.
 
        * Version number is increased to 2.11.19.
-       
+
 2003-10-09  Tetsurou Okazaki  <okazaki@be.to>
 
        * wl-summary.el (wl-summary-search-by-subject): Remove unused local
        * wl-highlight.el (wl-highlight-summary-current-line): Added optional
        argument number and flag.
 
-       * wl-action.el (wl-summary-registered-temp-mark): 
+       * wl-action.el (wl-summary-registered-temp-mark):
        Do nothing when wl-summary-buffer-temp-mark-list is nil.
 
 2003-09-28  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
        (wl-message-header-narrowing-widen-at-mouse): Ditto.
        (wl-message-header-narrowing-setup): Ditto.
        (wl-message-header-narrowing-toggle): Ditto.
-       
+
        * wl-highlight.el (wl-message-header-narrowing-face): New face.
 
        * wl-vars.el (wl-folder-sync-range-alist): Set default range for
        'flag as all.
        (wl-use-flag-folder-help-echo): New user option.
 
-       * wl-summary.el (wl-summary-detect-mark-position): Bind 
+       * wl-summary.el (wl-summary-detect-mark-position): Bind
        wl-summary-highlight as nil.
        (wl-summary-set-mark-modified): Follow the API change.
        (wl-summary-mark-modified-p): Ditto.
        * wl-draft.el (wl-draft-kill): Follow the API change.
 
        * Version number is increased to 2.11.14.
-       
+
 2003-09-17  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
 
        * wl-draft.el (wl-draft-do-fcc): Follow the API change.
 
        * wl-highlight.el (wl-highlight-summary-line-string): Changed argument
        mark to flags.
-       (wl-highlight-summary-current-line): Decide the face not by the 
+       (wl-highlight-summary-current-line): Decide the face not by the
        persistent mark but flags.
 
 2003-08-22  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
        `wl-summary-message-visible-p' to check visibility of the message
        and jump to message only when the message line is visible and have
        different number; Call wl-summary-unset-mark with number argument.
-       (wl-summary-unset-mark): 
+       (wl-summary-unset-mark):
        Use `wl-summary-message-visible-p'
        to check visibility of the message and jump to message only when
        the message line is visible and have different number;
        order of the arguments for `wl-expire-message-p'.
        (Reported by Shinichiro HIDA <shinichiro@stained-g.net>)
 
-       * wl-summary.el (wl-summary-target-mark-reply-with-citation): 
+       * wl-summary.el (wl-summary-target-mark-reply-with-citation):
        Check return value of wl-summary-reply.
        (wl-summary-reply): Recover window configuration when an error occured.
 
        * wl-thread.el (wl-thread-delete-message): Always update
        wl-summary-buffer-number-list.
 
-       * wl-action.el (wl-summary-print-destination): 
+       * wl-action.el (wl-summary-print-destination):
        Do nothing when folder is nil.
 
 2003-07-18  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
 
        * wl-action.el (wl-summary-define-mark-action): Fixed region function.
 
-       * wl-summary.el (wl-summary-set-message-modified): 
+       * wl-summary.el (wl-summary-set-message-modified):
        Call wl-summary-set-mark-modified.
        (wl-summary-delete-messages-on-buffer): Call
        wl-folder-set-folder-updated instead of wl-folder-update-unread.
        (wl-summary-exec): Ditto.
 
 2003-07-15  Mito  <mito@mxa.nes.nec.co.jp>
-       
+
        * wl-summary.el (wl-summary-entity-info-msg): Don't replace '%' to
        '%%'.
 
        * wl-draft.el (wl-draft-normal-send-func): Fixed bug for removing
        empty lines.
 
-       * wl-action.el: New file. 
+       * wl-action.el: New file.
 
 2003-07-14  Yuuichi Teranishi  <teranisi@gohome.org>
 
        * wl-vars.el (wl-summary-mark-action-list): Moved from wl-summary.el
        and define using defcustom;
        Define 4th element as a face.
-       
-       * wl-summary.el (wl-summary-incorporate): Use 
+
+       * wl-summary.el (wl-summary-incorporate): Use
        `wl-summary-prefetch-region-no-mark' instead of
        `wl-summary-prefetch-region'.
        (wl-summary-prefetch-region-no-mark): Revival of old
        (wl-summary-insert-sequential): Changed argument msgdb to folder.
        (wl-summary-insert-headers): Changed argument overview to folder.
        (wl-summary-search-by-subject): Likewise.
-       (wl-summary-insert-thread): Renamed from 
+       (wl-summary-insert-thread): Renamed from
        wl-summary-insert-thread-entity and changed argument msgdb to folder.
 
        * wl-folder.el (wl-folder-check-one-entity): Treat elmo-imap4-bye-error
        and mailing-list:.
        (wl-summary-overview-entity-compare-by-list-info): Treat empty field
        value.
-       (wl-summary-line-list-info): Print mailing-list name even when 
+       (wl-summary-line-list-info): Print mailing-list name even when
        list-number is empty.
 
 2002-07-18  Yoichi NAKAYAMA  <yoichi@eken.phys.nagoya-u.ac.jp>
 
 2002-06-17  Yuuichi Teranishi  <teranisi@gohome.org>
 
-       * wl-summary.el (wl-summary-read-folder): Use copy-sequence 
+       * wl-summary.el (wl-summary-read-folder): Use copy-sequence
        `wl-folder-entity-hashtb' as completion table.
 
 2002-06-14  Katsumi Yamaoka  <yamaoka@jpl.org>
 
 2002-05-14  KAMO Tomoyuki  <kamo@i-manage.co.jp>
 
-       * wl-summary.el (wl-summary-prefetch-msg): 
+       * wl-summary.el (wl-summary-prefetch-msg):
        If wl-prefetch-confirm is nil and arg is non-nil, do prefetch.
 
 2002-05-11  Yuuichi Teranishi  <teranisi@gohome.org>
        (wl-summary-subject-filter-func-internal): Ditto.
        (All other related portions are changed.)
        (wl-summary-buffer-set-folder):
-       Set up wl-summary-buffer-number-column and 
+       Set up wl-summary-buffer-number-column and
        wl-summary-buffer-line-formatter
        (All other related portions are changed.)
        (wl-summary-buffer-number-column-detect): Abolished.
        * wl-folder.el (wl-folder-buffer-search-entity): Bind case-fold-search
        as nil.
 
-       * wl-thread.el (wl-thread-open-all-unread): Use 
+       * wl-thread.el (wl-thread-open-all-unread): Use
        elmo-folder-list-messages-mark-match.
        (wl-thread-insert-message): Removed argument `mark-alist'.
        (wl-thread-msg-mark-as-important): Use elmo-msgdb-get-mark and
index c63c5f1..f657e3b 100644 (file)
@@ -531,7 +531,7 @@ Refresh `wl-address-list', `wl-address-completion-list', and
       (while (re-search-forward ",$" nil t)
        (end-of-line)
        (forward-char 1)
-       (delete-backward-char 1))
+       (delete-char -1))
       (goto-char (point-min))
       (while (re-search-forward "^\\([^#;\n][^:]+\\):[ \t]*\\(.*\\)$" nil t)
        (setq alias (wl-match-buffer 1)
index 38f78c0..5b90ed2 100644 (file)
@@ -31,7 +31,7 @@
 ;;; Code:
 
 (defconst wl-demo-copyright-notice
-  "Copyright (C) 1998-2010 Yuuichi Teranishi <teranisi@gohome.org>"
+  "Copyright (C) 1998-2011 Yuuichi Teranishi <teranisi@gohome.org>"
   "A declaration of the copyright on Wanderlust.")
 
 (eval-when-compile
@@ -408,6 +408,17 @@ argument."
               1))
     buffer))
 
+;; Prune functions provided temporarily to avoid compile warnings.
+(eval-when-compile
+  (dolist (fn '(face-background-name
+               frame-char-height frame-char-width glyph-height glyph-width
+               image-size make-extent propertize set-extent-end-glyph
+               window-pixel-height window-pixel-width))
+    (when (and (get fn 'defalias-maybe)
+              (eq (symbol-function fn) 'ignore))
+      (put fn 'defalias-maybe nil)
+      (fmakunbound fn))))
+
 (require 'product)
 (product-provide (provide 'wl-demo) (require 'wl-version))
 
index 0e64e1b..9e966d7 100644 (file)
@@ -1878,7 +1878,7 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed"
        (goto-char delimline)
       (goto-char (point-min))
       (if (search-forward "\n\n" nil t)
-         (delete-backward-char 1)
+         (delete-char -1)
        (goto-char (point-max))))
     (wl-draft-check-new-line)
     (put-text-property (point)
@@ -2533,10 +2533,10 @@ Automatically applied in draft sending time."
 ;;;###autoload
 (defun wl-user-agent-compose (&optional to subject other-headers continue
                                        switch-function yank-action
-                                       send-actions)
+                                       send-actions return-action)
   "Support the `compose-mail' interface for wl.
 Only support for TO, SUBJECT, and OTHER-HEADERS has been implemented.
-Support for CONTINUE, YANK-ACTION, and SEND-ACTIONS has not
+Support for CONTINUE, YANK-ACTION, SEND-ACTIONS and RETURN-ACTION has not
 been implemented yet.  Partial support for SWITCH-FUNCTION now supported."
 
   (unless (featurep 'wl)
index 325475c..89bdaa7 100644 (file)
     )
   "The Message buffer toolbar.")
 
-(defalias 'wl-draft-insert-signature 'insert-signature);; for draft toolbar.
+(defalias 'wl-draft-insert-signature 'insert-signature)        ; for draft toolbar.
 
 (defvar wl-draft-toolbar
   '([wl-draft-send-from-toolbar
                            `((,@props ,(concat name "-down.xpm"))))
                      disabled (wl-e21-find-image
                                `((,@props ,(concat name "-disabled.xpm")))))
-               (set icon (vector down up disabled disabled)))
+               (if (and down disabled)
+                   (set icon (vector down up disabled disabled))
+                 (set icon up)))
            (setq bar nil
                  success nil))))
       success)))
     (beginning-of-line)
     (let (fld-name start end)
       (cond
-       (;; opened folder group
-       (and (wl-folder-buffer-group-p)
+       ;; opened folder group
+       ((and (wl-folder-buffer-group-p)
             (looking-at wl-highlight-folder-opened-regexp))
        (setq start (match-beginning 1)
              end (match-end 1))
        (wl-e21-highlight-folder-by-numbers start end
                                            'wl-highlight-folder-opened-face
                                            numbers))
-       (;; closed folder group
-       (and (wl-folder-buffer-group-p)
+       ;; closed folder group
+       ((and (wl-folder-buffer-group-p)
             (looking-at wl-highlight-folder-closed-regexp))
        (setq start (match-beginning 1)
              end (match-end 1))
        (wl-e21-highlight-folder-by-numbers start end
                                            'wl-highlight-folder-closed-face
                                            numbers))
-       (;; basic folder
-       (and (setq fld-name (wl-folder-get-folder-name-by-id
+       ;; basic folder
+       ((and (setq fld-name (wl-folder-get-folder-name-by-id
                             (get-text-property (point) 'wl-folder-entity-id)))
             (looking-at "[[:blank:]]+\\([^[:blank:]\n]+\\)"))
        (setq start (match-beginning 1)
                (unless (get (caar wl-folder-internal-icon-list) 'image)
                  (wl-folder-init-icons))
                (setq image
-                     (cond ((string= fld-name wl-trash-folder);; trash folder
-                            (let ((num (nth 2 numbers)));; number of messages
-                              (get (if (or (not num) (zerop num))
-                                       'wl-folder-trash-empty-image
-                                     'wl-folder-trash-image)
-                                   'image)))
-                           ((string= fld-name wl-draft-folder);; draft folder
-                            (get 'wl-folder-draft-image 'image))
-                           ((string= fld-name wl-queue-folder);; queue folder
-                            (get 'wl-folder-queue-image 'image))
-                           (;; and one of many other folders
-                            (setq type (or (elmo-folder-type fld-name)
-                                           (elmo-folder-type-internal
-                                            (elmo-make-folder fld-name))))
-                            (get (intern (format "wl-folder-%s-image" type))
-                                 'image)))))
+                     (cond
+                      ;; trash folder
+                      ((string= fld-name wl-trash-folder)
+                       (let ((num (nth 2 numbers))) ; number of messages
+                         (get (if (or (not num) (zerop num))
+                                  'wl-folder-trash-empty-image
+                                'wl-folder-trash-image)
+                              'image)))
+                      ;; draft folder
+                      ((string= fld-name wl-draft-folder)
+                       (get 'wl-folder-draft-image 'image))
+                      ;; queue folder
+                      ((string= fld-name wl-queue-folder)
+                       (get 'wl-folder-queue-image 'image))
+                      ;; and one of many other folders
+                      ((setq type (or (elmo-folder-type fld-name)
+                                      (elmo-folder-type-internal
+                                       (elmo-make-folder fld-name))))
+                       (get (intern (format "wl-folder-%s-image" type))
+                            'image)))))
              (overlay-put overlay 'before-string
                           (propertize " " 'display image
                                       'invisible t))))
index 0c14cfd..364f426 100644 (file)
@@ -358,7 +358,8 @@ It calls following-method selected from variable
       (when wl-highlight-body-too
        (wl-highlight-body))
       (run-hooks 'wl-draft-preview-message-hook))
-    (make-local-hook 'kill-buffer-hook)
+    (if (fboundp 'make-local-hook)
+       (make-local-hook 'kill-buffer-hook))
     (add-hook 'kill-buffer-hook #'wl-draft-hide-attributes-buffer nil t)
     (if wl-draft-preview-attributes
        (ignore-errors ; in case when the window is too small
index 2464ac4..094852c 100644 (file)
@@ -170,18 +170,28 @@ See `wl-summary-mark-action-list' for the detail of element."
          (funcall function folder (cdr partition) (car partition)))))))
 
 (defun wl-spam-register-spam-messages (folder numbers)
+  "Register messages specified by FOLDER and NUMBERS as spam.
+Put spam mark unless FOLDER is a spam folder."
   (elmo-with-progress-display (elmo-spam-register (length numbers))
       "Registering spam"
     (elmo-spam-register-spam-messages (elmo-spam-processor)
                                      folder
-                                     numbers)))
+                                     numbers))
+  (unless (eq (wl-spam-domain (elmo-folder-name-internal folder))
+             'spam)
+    (dolist (number numbers)
+      (wl-summary-spam number))))
 
 (defun wl-spam-register-good-messages (folder numbers)
+  "Register messages specified by FOLDER and NUMBERS as non-spam.
+Remove spam mark."
   (elmo-with-progress-display (elmo-spam-register (length numbers))
       "Registering good"
     (elmo-spam-register-good-messages (elmo-spam-processor)
                                      folder
-                                     numbers)))
+                                     numbers))
+  (dolist (number numbers)
+    (wl-summary-unmark-spam number)))
 
 (defun wl-spam-save-status (&optional force)
   (interactive "P")
@@ -266,18 +276,42 @@ See `wl-summary-mark-action-list' for the detail of element."
           (message "No message to test.")))))
 
 (defun wl-summary-register-as-spam ()
+  "Register current message as spam.
+Put spam mark unless current folder is a spam folder."
   (interactive)
   (let ((number (wl-summary-message-number)))
     (when number
       (wl-spam-register-spam-messages wl-summary-buffer-elmo-folder
                                      (list number)))))
 
+(defun wl-summary-register-as-spam-region (beg end)
+  "Register messages in the region between BEG and END as spam.
+Put spam mark unless current folder is a spam folder."
+  (interactive "r")
+  (let ((numbers (wl-summary-collect-numbers-region beg end)))
+    (cond (numbers
+          (wl-spam-register-spam-messages wl-summary-buffer-elmo-folder
+                                          numbers))
+         ((interactive-p)
+          (message "No message to register as spam.")))))
+
+(defun wl-thread-register-as-spam (&optional arg)
+  "Register messages which are the descendant of the current thread as spam.
+Put spam mark unless current folder is a spam folder.
+With prefix argument, it affects on the all messages in the thread tree."
+  (interactive "P")
+  (wl-thread-call-region-func 'wl-summary-register-as-spam-region arg))
+
 (defun wl-summary-register-as-spam-all ()
+  "Register all messages in the folder as spam.
+Put spam mark unless current folder is a spam folder."
   (interactive)
   (wl-spam-register-spam-messages wl-summary-buffer-elmo-folder
                                  wl-summary-buffer-number-list))
 
 (defun wl-summary-target-mark-register-as-spam ()
+  "Register messages with the target mark as spam.
+Put spam mark unless current folder is a spam folder."
   (interactive)
   (save-excursion
     (goto-char (point-min))
@@ -290,18 +324,42 @@ See `wl-summary-mark-action-list' for the detail of element."
        (wl-summary-unset-mark number)))))
 
 (defun wl-summary-register-as-good ()
+  "Register current message as non-spam.
+Remove spam mark."
   (interactive)
   (let ((number (wl-summary-message-number)))
     (when number
       (wl-spam-register-good-messages wl-summary-buffer-elmo-folder
                                      (list number)))))
 
+(defun wl-summary-register-as-good-region (beg end)
+  "Register messages in the region between BEG and END as non-spam.
+Remove spam mark."
+  (interactive "r")
+  (let ((numbers (wl-summary-collect-numbers-region beg end)))
+    (cond (numbers
+          (wl-spam-register-good-messages wl-summary-buffer-elmo-folder
+                                          numbers))
+         ((interactive-p)
+          (message "No message to register as good.")))))
+
+(defun wl-thread-register-as-good (&optional arg)
+  "Register messages which are the descendant of the current thread as non-spam.
+Remove spam mark.
+With prefix argument, it affects on the all messages in the thread tree."
+  (interactive "P")
+  (wl-thread-call-region-func 'wl-summary-register-as-good-region arg))
+
 (defun wl-summary-register-as-good-all ()
+  "Register all messages in the folder as non-spam.
+Remove spam mark."
   (interactive)
   (wl-spam-register-good-messages wl-summary-buffer-elmo-folder
                                  wl-summary-buffer-number-list))
 
 (defun wl-summary-target-mark-register-as-good ()
+  "Register messages with the target mark as non-spam.
+Remove spam mark."
   (interactive)
   (save-excursion
     (goto-char (point-min))
@@ -410,10 +468,18 @@ See `wl-summary-mark-action-list' for the detail of element."
   (define-key
     wl-summary-mode-map "rkc" 'wl-summary-test-spam-region)
   (define-key
+    wl-summary-mode-map "rks" 'wl-summary-register-as-spam-region)
+  (define-key
+    wl-summary-mode-map "rkn" 'wl-summary-register-as-good-region)
+  (define-key
     wl-summary-mode-map "tkm" 'wl-thread-spam)
   (define-key
     wl-summary-mode-map "tkc" 'wl-thread-test-spam)
   (define-key
+    wl-summary-mode-map "tks" 'wl-thread-register-as-spam)
+  (define-key
+    wl-summary-mode-map "tkn" 'wl-thread-register-as-good)
+  (define-key
     wl-summary-mode-map "mk" 'wl-summary-target-mark-spam)
   (define-key
     wl-summary-mode-map "ms" 'wl-summary-target-mark-register-as-spam)
index 72811d5..857ee19 100644 (file)
@@ -245,6 +245,7 @@ See also variable `wl-use-petname'."
 (defvar wl-summary-mode-menu-spec
   '("Summary"
     ["Read" wl-summary-read t]
+    ["Edit draft message" wl-summary-reedit :visible (string= (wl-summary-buffer-folder-name) wl-draft-folder)]
     ["Prev page" wl-summary-prev-page t]
     ["Next page" wl-summary-next-page t]
     ["Top"       wl-summary-display-top t]
@@ -292,7 +293,8 @@ See also variable `wl-use-petname'."
      ["Enter the message" wl-summary-jump-to-current-message t]
      ["Pipe message" wl-summary-pipe-message t]
      ["Print message" wl-summary-print-message t]
-     ["View raw message" wl-summary-display-raw t])
+     ["View raw message" wl-summary-display-raw t]
+     )
     ("Thread Operation"
      ["Open or Close" wl-thread-open-close (eq wl-summary-buffer-view 'thread)]
      ["Open all"     wl-thread-open-all (eq wl-summary-buffer-view 'thread)]
@@ -950,13 +952,15 @@ Entering Folder mode calls the value of `wl-summary-mode-hook'."
        (wl-summary-window-scroll-functions))
   (when wl-summary-buffer-window-scroll-functions
     (let ((hook (if wl-on-xemacs 'pre-idle-hook 'window-scroll-functions)))
-      (make-local-hook hook)
+      (if (fboundp 'make-local-hook)
+         (make-local-hook hook))
       (dolist (function wl-summary-buffer-window-scroll-functions)
        (add-hook hook function nil t)))
     (add-hook 'window-size-change-functions
              #'wl-summary-after-resize-function))
   (dolist (hook '(change-major-mode-hook kill-buffer-hook))
-    (make-local-hook hook)
+    (if (fboundp 'make-local-hook)
+       (make-local-hook hook))
     (add-hook hook #'wl-summary-buffer-detach nil t))
   ;; This hook may contain the function `wl-setup-summary' for reasons
   ;; of system internal to accord facilities for the Emacs variants.
@@ -1594,7 +1598,7 @@ If ARG is non-nil, checking is omitted."
                    (widen)
                    (y-or-n-p
                     (format
-                     "Message from %s has %d bytes.  Prefetch it? "
+                     "Message from %s has %s bytes.  Prefetch it? "
                      (concat
                       "[ "
                       (save-match-data
@@ -1610,7 +1614,10 @@ If ARG is non-nil, checking is omitted."
                              'from)
                             "??")))))
                       " ]")
-                     size))))
+                     (do ((size (/ size 1024.0) (/ size 1024.0))
+                          ;; kilo, mega, giga, tera, peta, exa
+                          (post-fixes (list "k" "M" "G" "T" "P" "E") (cdr post-fixes)))
+                         ((< size 1024) (format "%.0f%s" size (car post-fixes))))))))
            (message "")))              ; flush.
        (if force-read
            (save-excursion
@@ -3008,7 +3015,7 @@ The mark is decided according to the FOLDER and STATUS."
       (let ((inhibit-read-only t)
            (buffer-read-only nil))
        (move-to-column wl-summary-buffer-temp-mark-column)
-       (delete-backward-char 1)
+       (delete-char -1)
        (insert mark)))))
 
 (defun wl-summary-next-buffer ()
@@ -3141,7 +3148,7 @@ Return non-nil if the mark is updated"
                  (new-mark (wl-summary-persistent-mark number status)))
              (prog1
                  (unless (string= new-mark mark)
-                   (delete-backward-char 1)
+                   (delete-char -1)
                    (insert new-mark)
                    (wl-summary-set-message-modified)
                    t)
@@ -4744,7 +4751,7 @@ If ARG is numeric number, decode message as following:
   (let ((number (wl-summary-message-number))
        (folder wl-summary-buffer-elmo-folder))
     (if number
-       (let ((raw (elmo-message-fetch-string 
+       (let ((raw (elmo-message-fetch-string
                    folder number
                    (elmo-find-fetch-strategy folder number)))
              (raw-buffer (get-buffer-create "*wl:raw message*"))
index a17c4a7..fcc44d8 100644 (file)
@@ -97,6 +97,7 @@ Entering WL-Template mode calls the value of `wl-template-mode-hook'."
   (interactive "P")
   (unless wl-template-alist
     (error "Please set `wl-template-alist'"))
+  (setq wl-draft-config-exec-flag t)
   (if (not (if arg
               (not wl-template-visible-select)
             wl-template-visible-select))
index dea7a78..568be98 100644 (file)
@@ -274,6 +274,7 @@ which are replaced by the given information:
 %D The day of the date field of the message (zero padded).
 %W The weekday name of the date field of the message (zero padded).
 %h The hour of the date field of the message (zero padded).
+%l The number in the mailing list.
 %m The minute of the date field of the message (zero padded).
 %[ An open bracket.  If the message thread is linked,
    it is replaced with '<'.
@@ -287,7 +288,10 @@ which are replaced by the given information:
 %f The from: field string of the message.
 %s The subject: field string of the message.
 %S The size of the message (if available).
+%t The branch of the thread.
+%@ `@' only if the first MIME part is multipart/mixed.
 %~ If the previous spec is not zero-length, replaced with ' '.
+%#  mailing list information (`(' ML-name [ ` ' ML-number ] `)')
 
 If the format string contains the specifiers %( and %), the text between
 them will have the specified number of columns.
index 3e62300..8bd5086 100644 (file)
     )
   "The Message buffer toolbar.")
 
-(defalias 'wl-draft-insert-signature 'insert-signature);; for draft toolbar.
+(defalias 'wl-draft-insert-signature 'insert-signature)        ; for draft toolbar.
 
 (defvar wl-draft-toolbar
   '([wl-draft-send-from-toolbar
     (beginning-of-line)
     (let (fld-name)
       (cond
-       (;; opened folder group
-       (and (wl-folder-buffer-group-p)
+       ;; opened folder group
+       ((and (wl-folder-buffer-group-p)
             (looking-at wl-highlight-folder-opened-regexp))
        (wl-xmas-highlight-folder-group-line 'wl-folder-opened-glyph
                                             'wl-highlight-folder-opened-face
                                             numbers))
-       (;; closed folder group
-       (and (wl-folder-buffer-group-p)
+       ;; closed folder group
+       ((and (wl-folder-buffer-group-p)
             (looking-at wl-highlight-folder-closed-regexp))
        (wl-xmas-highlight-folder-group-line 'wl-folder-closed-glyph
                                             'wl-highlight-folder-closed-face
                                             numbers))
-       (;; basic folder
-       (and (setq fld-name (wl-folder-get-folder-name-by-id
+       ;; basic folder
+       ((and (setq fld-name (wl-folder-get-folder-name-by-id
                             (get-text-property (point) 'wl-folder-entity-id)))
             (looking-at "[ \t]+\\([^ \t]+\\)"))
        (let ((start (match-beginning 1)))
              (set-extent-begin-glyph
               extent
               (cond
-               ((string= fld-name wl-trash-folder);; trash folder
-                (let ((num (nth 2 numbers)));; number of messages
+               ;; trash folder
+               ((string= fld-name wl-trash-folder)
+                (let ((num (nth 2 numbers))) ; number of messages
                   (get (if (or (not num) (zerop num))
                            'wl-folder-trash-empty-glyph
                          'wl-folder-trash-glyph)
                        'glyph)))
-               ((string= fld-name wl-draft-folder);; draft folder
+               ;; draft folder
+               ((string= fld-name wl-draft-folder)
                 (get 'wl-folder-draft-glyph 'glyph))
-               ((string= fld-name wl-queue-folder);; queue folder
+               ;; queue folder
+               ((string= fld-name wl-queue-folder)
                 (get 'wl-folder-queue-glyph 'glyph))
-               (;; and one of many other folders
-                (setq type (or (elmo-folder-type fld-name)
+               ;; and one of many other folders
+               ((setq type (or (elmo-folder-type fld-name)
                                (elmo-folder-type-internal
                                 (elmo-make-folder fld-name))))
                 (get (intern (format "wl-folder-%s-glyph" type)) 'glyph))))))