From: tomo Date: Sun, 3 Jul 2011 13:28:57 +0000 (+0000) Subject: This commit was manufactured by cvs2svn to create branch 'elmo-imap4-new- X-Git-Tag: elmo-imap4-new-search-root X-Git-Url: http://git.chise.org/gitweb/?p=elisp%2Fwanderlust.git;a=commitdiff_plain;h=3c9673ee9968615c8a890d040cce22d7a4234a2a;hp=d31b8547d2f67d46f8ef9a302e0a0f0f714d0f82 This commit was manufactured by cvs2svn to create branch 'elmo-imap4-new- search'. --- diff --git a/ChangeLog b/ChangeLog index da8f88f..de7bf5a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,26 @@ +2011-02-01 Tetsurou Okazaki + + * 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 + + * INSTALL: Update recommended version of APEL. + * INSTALL.ja: Ditto. + +2010-07-11 David Maus + + * doc/wl.texi (Variables of Summary): Replace unicode character. + +2010-04-29 Tetsurou Okazaki + + * WL-MK (uninstall-wl-icons): New function. Uninstall *.img + files as well. + (uninstall-wl-package): Use `uninstall-wl-icons'. + 2010-03-03 TAKAHASHI Kaoru * etc/icons/unplugged.xpm: Change design. Use `unplugged' style diff --git a/INSTALL b/INSTALL index 6728742..7e6ba67 100644 --- 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). diff --git a/INSTALL.ja b/INSTALL.ja index b2ea832..bc97d27 100644 --- a/INSTALL.ja +++ b/INSTALL.ja @@ -33,23 +33,23 @@ MIME$BMQ%b%8%e!<%k$NA*Br(B (a) XEmacs 21.1 $B0J9_(B - APEL 10.7, FLIM 1.14.9, SEMI 1.14.6 + APEL 10.8, FLIM 1.14.9, SEMI 1.14.6 $B2DG=$J$i$P(B XEmacs $B$N%Q%C%1!<%8$H$7$F%$%s%9%H!<%k$9$k$3$H$r$*4+$a$7$^$9!#(B (b) Emacs 20.4 $B0J9_(B - APEL 10.7, FLIM 1.14.9, SEMI 1.14.6 + APEL 10.8, FLIM 1.14.9, SEMI 1.14.6 (c) Emacs 20.1$B!A(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 $B$,F0$-$^$;$s$N$G!"Be$o$j$K(B CLIME $B$r%$%s%9%H!<%k$7$F$/$@$5$$!#(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 $B%Y!<%9$N(B Mule $B$G$O(B SEMI $B$rF0:n$5$;$k$3$H$,2DG=$G$9!#2<5-(B $B$N%Z!<%8$,;29M$K$J$j$^$9!#(B diff --git a/NEWS b/NEWS index 695d3ec..c28552b 100644 --- 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 --- a/NEWS.ja +++ b/NEWS.ja @@ -2,6 +2,10 @@ Wanderlust NEWS ($BF|K\8lHG(B) -- User-visible changes in Wanderlust. * 2.14.x $B$+$i(B 2.16.0 $B$X$NJQ99E@(B +** spam $B$H$7$FEPO?$7$?%a%C%;!<%8$K(B spam $B%^!<%/$rIU$1$^$9!#(B + +** non-spam $B$H$7$FEPO?$7$?%a%C%;!<%8$+$i(B spam $B%^!<%/$rl9g$K(B spam $B%^!<%/$r(B $BIU$1$^$9!#(Bspam $B$G$J$$$HH=Dj$5$l$?>l9g$O(B spam $B%^!<%/$rl9g$O(B spam $B%^!<%/$r + + * 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 + + * 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 + + * 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 + + * elmo-nntp.el (elmo-nntp-folder-msgdb-create): Remove accidental + rebinding of new message db symbol. + +2010-11-02 Kazuhiro Ito + + * elmo-pop3.el (elmo-folder-open-internal): Don't load location + map if it is already loaded. + +2010-10-31 David Maus + + * 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 + + * 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 + + * elmo-multi.el (elmo-folder-open-internal-p): Evaluate symbol to + return state of child folders. + +2010-10-13 David Maus + + * 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 + + * 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 + + * 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 + + * 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 + + * 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 + + * 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 + + * elmo.el (elmo-folder-move-messages): Open source folder before + moving messages. + 2010-04-15 David Maus * elmo-imap4.el (elmo-imap4-folder-name-syntax): Allow numbers in @@ -1531,7 +1644,7 @@ 2005-02-17 ARISAWA Akihiro - * 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 @@ -2077,7 +2190,7 @@ * 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 * elmo-split.el (elmo-split-rule): Update comment. @@ -2179,7 +2292,7 @@ * 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'. @@ -2693,7 +2806,7 @@ 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 @@ -3556,7 +3669,7 @@ 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. @@ -3582,7 +3695,7 @@ 2003-09-21 Hiroya Murata - * 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. @@ -3681,7 +3794,7 @@ (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 @@ -3718,7 +3831,7 @@ * 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. @@ -3731,11 +3844,11 @@ 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 @@ -4011,7 +4124,7 @@ `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. @@ -4305,7 +4418,7 @@ 2003-08-05 Yuuichi Teranishi - * 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 @@ -4429,7 +4542,7 @@ 2002-05-05 David Smith - * 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 @@ -4474,7 +4587,7 @@ (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). @@ -4682,7 +4795,7 @@ 2003-03-25 Yuuichi Teranishi - * 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 @@ -4833,7 +4946,7 @@ * 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. @@ -5483,7 +5596,7 @@ * 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. diff --git a/elmo/acap.el b/elmo/acap.el index c2ad7e3..a21501f 100644 --- a/elmo/acap.el +++ b/elmo/acap.el @@ -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) diff --git a/elmo/elmo-archive.el b/elmo/elmo-archive.el index a2b9549..274bde1 100644 --- a/elmo/elmo-archive.el +++ b/elmo/elmo-archive.el @@ -146,15 +146,15 @@ (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) diff --git a/elmo/elmo-imap4.el b/elmo/elmo-imap4.el index a526fe4..58c0546 100644 --- a/elmo/elmo-imap4.el +++ b/elmo/elmo-imap4.el @@ -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 diff --git a/elmo/elmo-localdir.el b/elmo/elmo-localdir.el index 9651f8a..78a30f1 100644 --- a/elmo/elmo-localdir.el +++ b/elmo/elmo-localdir.el @@ -329,11 +329,10 @@ (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)) diff --git a/elmo/elmo-map.el b/elmo/elmo-map.el index 0ba69ff..383124a 100644 --- a/elmo/elmo-map.el +++ b/elmo/elmo-map.el @@ -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 diff --git a/elmo/elmo-nntp.el b/elmo/elmo-nntp.el index 9e57d86..6a05ec0 100644 --- a/elmo/elmo-nntp.el +++ b/elmo/elmo-nntp.el @@ -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)) diff --git a/elmo/elmo-pop3.el b/elmo/elmo-pop3.el index ac755f3..07555c6 100644 --- a/elmo/elmo-pop3.el +++ b/elmo/elmo-pop3.el @@ -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) diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el index af9664f..aff84f3 100644 --- a/elmo/elmo-util.el +++ b/elmo/elmo-util.el @@ -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"))) diff --git a/elmo/elmo.el b/elmo/elmo.el index 15c935e..3b3e707 100644 --- a/elmo/elmo.el +++ b/elmo/elmo.el @@ -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 diff --git a/elmo/utf7.el b/elmo/utf7.el index 30fdb74..dd38408 100644 --- a/elmo/utf7.el +++ b/elmo/utf7.el @@ -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. diff --git a/tests/ChangeLog b/tests/ChangeLog index e2999bd..1919168 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,33 @@ +2011-05-30 TAKAHASHI Kaoru + + * test-wl-address.el: New file. + +2011-04-07 TAKAHASHI Kaoru + + * 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 + + * 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 + + * 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 * test-utf7.el (test-utf7-encode-string-alpha): Fix indent. diff --git a/tests/test-dist.el b/tests/test-dist.el index 432500e..5619f0b 100644 --- a/tests/test-dist.el +++ b/tests/test-dist.el @@ -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) diff --git a/tests/test-elmo-date.el b/tests/test-elmo-date.el index 1808eb0..04d7814 100644 --- a/tests/test-elmo-date.el +++ b/tests/test-elmo-date.el @@ -1,3 +1,4 @@ +;; -*- lexical-binding: t -*- (require 'lunit) (require 'elmo-date) diff --git a/tests/test-elmo-imap4.el b/tests/test-elmo-imap4.el index bbb824e..0df25f9 100644 --- a/tests/test-elmo-imap4.el +++ b/tests/test-elmo-imap4.el @@ -1,3 +1,4 @@ +;; -*- lexical-binding: t -*- (require 'lunit) (require 'elmo-imap4) diff --git a/tests/test-elmo-localdir.el b/tests/test-elmo-localdir.el index b3eb877..27a5aa7 100644 --- a/tests/test-elmo-localdir.el +++ b/tests/test-elmo-localdir.el @@ -1,3 +1,4 @@ +;; -*- lexical-binding: t -*- (require 'lunit) (require 'elmo-localdir) diff --git a/tests/test-elmo-util.el b/tests/test-elmo-util.el index 01e178f..6c0c6b8 100644 --- a/tests/test-elmo-util.el +++ b/tests/test-elmo-util.el @@ -1,3 +1,4 @@ +;; -*- lexical-binding: t -*- (require 'lunit) (require 'elmo-util) diff --git a/tests/test-rfc2368.el b/tests/test-rfc2368.el index 763ced2..6cf96e6 100644 --- a/tests/test-rfc2368.el +++ b/tests/test-rfc2368.el @@ -1,3 +1,4 @@ +;; -*- lexical-binding: t -*- (require 'lunit) (require 'rfc2368) diff --git a/tests/test-utf7.el b/tests/test-utf7.el index 80cb839..43d3f15 100644 --- a/tests/test-utf7.el +++ b/tests/test-utf7.el @@ -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 index 0000000..1e2418f --- /dev/null +++ b/tests/test-wl-address.el @@ -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 ") + ))) + +(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)") + ))) diff --git a/tests/test-wl-draft.el b/tests/test-wl-draft.el index fb48574..fe71d6e 100644 --- a/tests/test-wl-draft.el +++ b/tests/test-wl-draft.el @@ -1,3 +1,4 @@ +;; -*- lexical-binding: t -*- (require 'lunit) (require 'wl-draft) diff --git a/tests/test-wl-util.el b/tests/test-wl-util.el index 1efc1bf..f833485 100644 --- a/tests/test-wl-util.el +++ b/tests/test-wl-util.el @@ -1,3 +1,4 @@ +;; -*- lexical-binding: t -*- (require 'lunit) (require 'wl-util) diff --git a/utils/ChangeLog b/utils/ChangeLog index d0f205a..c27dd04 100644 --- a/utils/ChangeLog +++ b/utils/ChangeLog @@ -1,3 +1,39 @@ +2011-04-20 TAKAHASHI Kaoru + + * ptexinfmt.el: Fix description comment style. + +2011-04-13 TAKAHASHI Kaoru + + * 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 + + * ptexinfmt.el (texinfo-multitable-widths): Use `make-char' + instead of KANJI literal. + +2010-08-31 TAKAHASHI Kaoru + + * wl-addrbook.el: Delete traing whitespace. + * wl-complete.el: Ditto. + * rfc2368.el: Ditto. + * ssl.el: Ditto. + +2010-08-24 TAKAHASHI Kaoru + + * 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 + + * ssl.el (open-ssl-stream, condition-case): Don't use old-style + backquotes. + 2010-01-06 TAKAHASHI Kaoru * wl-addrbook.el (wl-summary-addrbook-add): Use diff --git a/utils/ptexinfmt.el b/utils/ptexinfmt.el index 4c193e8..2875efb 100644 --- a/utils/ptexinfmt.el +++ b/utils/ptexinfmt.el @@ -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 "$BI}9-J8;z(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)) diff --git a/utils/rfc2368.el b/utils/rfc2368.el index abca6ed..a2ab61e 100644 --- a/utils/rfc2368.el +++ b/utils/rfc2368.el @@ -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) diff --git a/utils/ssl.el b/utils/ssl.el index 0b74cd0..7006955 100644 --- a/utils/ssl.el +++ b/utils/ssl.el @@ -38,13 +38,13 @@ ;; 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)) diff --git a/utils/wl-addrbook.el b/utils/wl-addrbook.el index b553230..e03b94b 100644 --- a/utils/wl-addrbook.el +++ b/utils/wl-addrbook.el @@ -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 diff --git a/utils/wl-complete.el b/utils/wl-complete.el index 70dfc68..b44afe7 100644 --- a/utils/wl-complete.el +++ b/utils/wl-complete.el @@ -123,7 +123,7 @@ (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 diff --git a/wl/ChangeLog b/wl/ChangeLog index d3ad732..9cb66e4 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,95 @@ +2011-06-03 Erik Hetzner + + * wl-vars.el (wl-summary-line-format): Document missing control + strings. + +2011-01-30 TAKAHASHI Kaoru + + * wl-demo.el (wl-demo-copyright-notice): Add 2011. + +2011-01-29 David Maus + + * wl-draft.el (wl-user-agent-compose): Add optional argument + RETURN-ACTION, introduced to `compose-mail' in Emacs 24. + +2011-01-09 David Maus + + * wl-template.el (wl-template-select): Reset draft config exec + flag when selecting template. + +2010-10-18 Katsumi Yamaoka + + * 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 + + * wl-demo.el: Prune functions provided temporarily to avoid + compile warnings in the end. + +2010-09-08 Tetsurou Okazaki + + * 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 + + * wl-summary.el: Delete trailing whitespace. + +2010-08-27 Kenichi Okada + + * wl-summary.el (wl-summary-prefetch-msg): Make the confirmation + message human-readable. + +2010-08-26 TAKAHASHI Kaoru + + * 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 + + * 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 + + * wl-summary.el (wl-summary-mode-menu-spec): Add menu option to + edit draft message when in draft folder. + +2010-07-21 Katsumi Yamaoka + + * 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 + + * 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 + * 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 * wl-draft.el (wl-user-agent-insert-body): Make sure body ends with @@ -1531,12 +1623,12 @@ 2004-12-11 Yuuichi Teranishi - * 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. @@ -1793,7 +1885,7 @@ 2004-09-29 Yuuichi Teranishi - * 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. @@ -1970,8 +2062,8 @@ 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 @@ -2679,7 +2771,7 @@ * 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]: @@ -2739,7 +2831,7 @@ * 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. @@ -2751,7 +2843,7 @@ 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 @@ -2764,7 +2856,7 @@ (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. @@ -2789,7 +2881,7 @@ (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 @@ -3281,7 +3373,7 @@ (wl-draft-reedit): Rewrite. * Version number is increased to 2.11.19. - + 2003-10-09 Tetsurou Okazaki * wl-summary.el (wl-summary-search-by-subject): Remove unused local @@ -3373,7 +3465,7 @@ * 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 @@ -3553,14 +3645,14 @@ (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. @@ -3584,7 +3676,7 @@ * wl-draft.el (wl-draft-kill): Follow the API change. * Version number is increased to 2.11.14. - + 2003-09-17 Hiroya Murata * wl-draft.el (wl-draft-do-fcc): Follow the API change. @@ -3715,7 +3807,7 @@ * 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 @@ -3851,7 +3943,7 @@ `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; @@ -3988,7 +4080,7 @@ order of the arguments for `wl-expire-message-p'. (Reported by Shinichiro HIDA ) - * 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. @@ -4134,7 +4226,7 @@ * 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 @@ -4177,7 +4269,7 @@ * 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. @@ -4226,7 +4318,7 @@ (wl-summary-exec): Ditto. 2003-07-15 Mito - + * wl-summary.el (wl-summary-entity-info-msg): Don't replace '%' to '%%'. @@ -4255,7 +4347,7 @@ * 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 @@ -4280,8 +4372,8 @@ * 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 @@ -4482,7 +4574,7 @@ (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 @@ -5530,7 +5622,7 @@ 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 @@ -5623,7 +5715,7 @@ 2002-06-17 Yuuichi Teranishi - * 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 @@ -5803,7 +5895,7 @@ 2002-05-14 KAMO Tomoyuki - * 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 @@ -6022,7 +6114,7 @@ (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. @@ -6093,7 +6185,7 @@ * 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 diff --git a/wl/wl-address.el b/wl/wl-address.el index c63c5f1..f657e3b 100644 --- a/wl/wl-address.el +++ b/wl/wl-address.el @@ -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) diff --git a/wl/wl-demo.el b/wl/wl-demo.el index 38f78c0..5b90ed2 100644 --- a/wl/wl-demo.el +++ b/wl/wl-demo.el @@ -31,7 +31,7 @@ ;;; Code: (defconst wl-demo-copyright-notice - "Copyright (C) 1998-2010 Yuuichi Teranishi " + "Copyright (C) 1998-2011 Yuuichi Teranishi " "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)) diff --git a/wl/wl-draft.el b/wl/wl-draft.el index 0e64e1b..9e966d7 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -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) diff --git a/wl/wl-e21.el b/wl/wl-e21.el index 325475c..89bdaa7 100644 --- a/wl/wl-e21.el +++ b/wl/wl-e21.el @@ -153,7 +153,7 @@ ) "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 @@ -202,7 +202,9 @@ `((,@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))) @@ -316,8 +318,8 @@ (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)) @@ -327,8 +329,8 @@ (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)) @@ -338,8 +340,8 @@ (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) @@ -358,22 +360,26 @@ (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)))) diff --git a/wl/wl-mime.el b/wl/wl-mime.el index 0c14cfd..364f426 100644 --- a/wl/wl-mime.el +++ b/wl/wl-mime.el @@ -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 diff --git a/wl/wl-spam.el b/wl/wl-spam.el index 2464ac4..094852c 100644 --- a/wl/wl-spam.el +++ b/wl/wl-spam.el @@ -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) diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 72811d5..857ee19 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -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*")) diff --git a/wl/wl-template.el b/wl/wl-template.el index a17c4a7..fcc44d8 100644 --- a/wl/wl-template.el +++ b/wl/wl-template.el @@ -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)) diff --git a/wl/wl-vars.el b/wl/wl-vars.el index dea7a78..568be98 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -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. diff --git a/wl/wl-xmas.el b/wl/wl-xmas.el index 3e62300..8bd5086 100644 --- a/wl/wl-xmas.el +++ b/wl/wl-xmas.el @@ -123,7 +123,7 @@ ) "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 @@ -252,20 +252,20 @@ (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))) @@ -280,18 +280,21 @@ (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))))))