This commit was manufactured by cvs2svn to create tag 'merged-trunk-to-elmo- merged-trunk-to-elmo-imap4-compliance-1
authortomo <tomo>
Thu, 2 Sep 2010 01:04:11 +0000 (01:04 +0000)
committertomo <tomo>
Thu, 2 Sep 2010 01:04:11 +0000 (01:04 +0000)
imap4-compliance-1'.

34 files changed:
ChangeLog
INSTALL
INSTALL.ja
WL-MK
doc/wl-ja.texi
doc/wl.texi
elmo/ChangeLog
elmo/acap.el
elmo/elmo-archive.el
elmo/elmo-filter.el
elmo/elmo-imap4.el
elmo/elmo-localdir.el
elmo/elmo-map.el
elmo/elmo-multi.el
elmo/elmo-pipe.el
elmo/elmo-pop3.el
elmo/elmo-util.el
elmo/elmo.el
elmo/utf7.el
tests/ChangeLog
tests/test-dist.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-draft.el
wl/wl-e21.el
wl/wl-spam.el
wl/wl-summary.el
wl/wl-xmas.el

index da8f88f..22bc186 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+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/WL-MK b/WL-MK
index d7ab2d6..88f8dc8 100644 (file)
--- a/WL-MK
+++ b/WL-MK
                                        "\\.img$\\|\\.xbm$")))))
     (install-files icons ICONDIR PIXMAPDIR nil 'overwrite)))
 
+(defun uninstall-wl-icons ()
+  (let* ((case-fold-search t)
+        (icons (directory-files PIXMAPDIR t "\\.img$\\|\\.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))))))
+
 (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..5e0f1ad 100644 (file)
@@ -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$^$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$^$9!#\e(B
+
 @item t k m
 @kindex t k m (Summary)
 @findex wl-thread-spam
@@ -7157,6 +7167,20 @@ 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$^$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$^$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
index f2517c2..a7997f6 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.
 
@@ -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.
+
+@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.
+
 @item t k m
 @kindex t k m (Summary)
 @findex wl-thread-spam
@@ -7211,6 +7221,18 @@ 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.
+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.
+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
index 3ceb6d7..c1dd3b3 100644 (file)
@@ -1,3 +1,54 @@
+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
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 700be31..65aacfa 100644 (file)
 (luna-define-method elmo-folder-open-internal ((folder elmo-filter-folder))
   (elmo-folder-open-internal (elmo-filter-folder-target-internal folder)))
 
+(luna-define-method elmo-folder-open-internal-p ((folder elmo-filter-folder))
+  (elmo-folder-open-internal-p (elmo-filter-folder-target-internal folder)))
+
 (luna-define-method elmo-folder-check ((folder elmo-filter-folder))
   (when (elmo-filter-folder-require-msgdb-internal folder)
     (elmo-folder-synchronize (elmo-filter-folder-target-internal folder))))
index a526fe4..fa379be 100644 (file)
@@ -1314,7 +1314,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
@@ -1663,7 +1663,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 +1990,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
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..20c6f65 100644 (file)
@@ -233,6 +233,9 @@ Return new location alist."
      folder
      (elmo-map-folder-list-message-locations folder))))
 
+(luna-define-method elmo-folder-open-internal-p ((folder elmo-map-folder))
+  (elmo-location-map-alist folder))
+
 (luna-define-method elmo-folder-commit :after ((folder elmo-map-folder))
   (when (elmo-folder-persistent-p folder)
     (elmo-location-map-save folder (elmo-folder-msgdb-path folder))))
index 2e52de3..122a6df 100644 (file)
   (dolist (fld (elmo-multi-folder-children-internal folder))
     (elmo-folder-open-internal fld)))
 
+(luna-define-method elmo-folder-open-internal-p ((folder elmo-multi-folder))
+  (let (open)
+    (dolist (fld (elmo-multi-folder-children-internal folder))
+      (setq open (and open (elmo-folder-open-internal-p fld))))))
+
 (luna-define-method elmo-folder-check ((folder elmo-multi-folder))
   (dolist (fld (elmo-multi-folder-children-internal folder))
     (elmo-folder-check fld)))
index f3c7ffc..68bb479 100644 (file)
 (luna-define-method elmo-folder-open-internal ((folder elmo-pipe-folder))
   (elmo-folder-open-internal (elmo-pipe-folder-dst-internal folder)))
 
+(luna-define-method elmo-folder-open-internal-p ((folder elmo-pipe-folder))
+  (elmo-folder-open-internal-p (elmo-pipe-folder-dst-internal folder)))
+
 (luna-define-method elmo-folder-close-internal ((folder elmo-pipe-folder))
   (elmo-folder-close-internal (elmo-pipe-folder-dst-internal folder)))
 
index ac755f3..aff5d75 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
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..c3c0bd7 100644 (file)
@@ -217,6 +217,9 @@ If optional LOAD-MSGDB is non-nil, msgdb is loaded.
 (luna-define-generic elmo-folder-open-internal (folder)
   "Open FOLDER (without loading saved folder status).")
 
+(luna-define-generic elmo-folder-open-internal-p (folder)
+  "Return non-nil if FOLDER is opened internally.")
+
 (luna-define-generic elmo-folder-check (folder)
   "Check the FOLDER to obtain newest information at the next list operation.")
 
@@ -713,6 +716,10 @@ Return a cons cell of (NUMBER-CROSSPOSTS . NEW-FLAG-ALIST).")
   nil ; default is do nothing.
   )
 
+(luna-define-method elmo-folder-open-internal-p ((folder elmo-folder))
+  t ; default is always opened internally
+  )
+
 (luna-define-method elmo-folder-check ((folder elmo-folder))
   nil) ; default is noop.
 
@@ -1188,7 +1195,8 @@ 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.
+         (unless (elmo-folder-open-internal-p src-folder)
+           (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..f6adbaf 100644 (file)
@@ -1,3 +1,9 @@
+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..aabfd03 100644 (file)
        WL-MODULES)
       lost))))
 
+(luna-define-method test-wl-modules-trailing-whitespace ((case test-dist))
+  (let (filename badmodule)
+    (mapc
+     (lambda (module)
+       (setq 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 'badmodule filename))))
+     WL-MODULES)
+    (lunit-assert (null badmodule))))
+
+
 ;; ELMO-MODULES
 (luna-define-method test-elmo-modules-exists ((case test-dist))
   (lunit-assert
        ELMO-MODULES)
       lost))))
 
+(luna-define-method test-elmo-modules-trailing-whitespace ((case test-dist))
+  (let (filename badmodule)
+    (mapc
+     (lambda (module)
+       (setq 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 'badmodule filename))))
+     ELMO-MODULES)
+    (lunit-assert (null badmodule))))
+
+
 ;; UTILS-MODULES
 (luna-define-method test-util-modules-exists ((case test-dist))
   (lunit-assert
        UTILS-MODULES)
       lost))))
 
+(luna-define-method test-util-modules-trailing-whitespace ((case test-dist))
+  (let (filename badmodule)
+    (mapc
+     (lambda (module)
+       (setq 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 'badmodule filename))))
+     UTILS-MODULES)
+    (lunit-assert (null badmodule))))
+
+
 ;; Icons
 (luna-define-method test-wl-icon-exists ((case test-dist))
   (lunit-assert
index d0f205a..6c41ade 100644 (file)
@@ -1,3 +1,28 @@
+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..4c3e9ec 100644 (file)
@@ -170,7 +170,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 +412,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..d9703a4 100644 (file)
@@ -1,3 +1,50 @@
+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
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 0e64e1b..28b73b2 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)
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 2464ac4..8cb870f 100644 (file)
@@ -272,6 +272,19 @@ See `wl-summary-mark-action-list' for the detail of element."
       (wl-spam-register-spam-messages wl-summary-buffer-elmo-folder
                                      (list number)))))
 
+(defun wl-summary-register-as-spam-region (beg end)
+  (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)
+  (interactive "P")
+  (wl-thread-call-region-func 'wl-summary-register-as-spam-region arg))
+
 (defun wl-summary-register-as-spam-all ()
   (interactive)
   (wl-spam-register-spam-messages wl-summary-buffer-elmo-folder
@@ -296,6 +309,19 @@ See `wl-summary-mark-action-list' for the detail of element."
       (wl-spam-register-good-messages wl-summary-buffer-elmo-folder
                                      (list number)))))
 
+(defun wl-summary-register-as-good-region (beg end)
+  (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)
+  (interactive "P")
+  (wl-thread-call-region-func 'wl-summary-register-as-good-region arg))
+
 (defun wl-summary-register-as-good-all ()
   (interactive)
   (wl-spam-register-good-messages wl-summary-buffer-elmo-folder
@@ -410,10 +436,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..99742e6 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)]
@@ -1594,7 +1596,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 +1612,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 +3013,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 +3146,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 +4749,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 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))))))