From 08b3637f15ae137b9c5ae2cebeb11ae33813ca90 Mon Sep 17 00:00:00 2001 From: teranisi Date: Mon, 23 Oct 2000 02:13:10 +0000 Subject: [PATCH] * elmo-maildir.el (elmo-maildir-get-filename): Fixed problem when `file-name-completion' returns t. (Reported by Yoichi NAKAYAMA ) (elmo-maildir-set-mark): Put `info' part to the files in the cur directory if it does not exist. (elmo-maildir-update-current): Use `while' instead of `mapcar' for iteration. --- elmo/ChangeLog | 10 ++++++++++ elmo/elmo-maildir.el | 21 ++++++++++++--------- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 27751ec..d72e72a 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,13 @@ +2000-10-23 Yuuichi Teranishi + + * elmo-maildir.el (elmo-maildir-get-filename): Fixed problem when + `file-name-completion' returns t. + (Reported by Yoichi NAKAYAMA ) + (elmo-maildir-set-mark): Put `info' part to the files in the cur + directory if it does not exist. + (elmo-maildir-update-current): Use `while' instead of `mapcar' + for iteration. + 2000-10-20 Yuuichi Teranishi * elmo-imap4.el (elmo-imap4-folder-exists-p): Removed `condition-case' diff --git a/elmo/elmo-maildir.el b/elmo/elmo-maildir.el index 43d70e1..19663aa 100644 --- a/elmo/elmo-maildir.el +++ b/elmo/elmo-maildir.el @@ -52,7 +52,7 @@ This variable should not be used in elsewhere.") (expand-file-name (let ((file (file-name-completion (symbol-name location) (expand-file-name "cur" dir)))) - (if (eq file t) location file)) + (if (eq file t) (symbol-name location) file)) (expand-file-name "cur" dir))) (defsubst elmo-maildir-list-location (dir &optional child-dir) @@ -114,23 +114,26 @@ This variable should not be used in elsewhere.") ;; cleanup tmp directory. (elmo-maildir-cleanup-temporal maildir) ;; move new msgs to cur directory. - (mapcar (lambda (x) - (rename-file - (expand-file-name x (expand-file-name "new" maildir)) - (expand-file-name (concat x ":2,") - (expand-file-name "cur" maildir)))) - news))) + (while news + (rename-file + (expand-file-name (car news) (expand-file-name "new" maildir)) + (expand-file-name (concat (car news) ":2,") + (expand-file-name "cur" maildir))) + (setq news (cdr news))))) (defun elmo-maildir-set-mark (filename mark) "Mark the file in the maildir. MARK is a character." - (if (string-match "^\\([^:]+:2,\\)\\(.*\\)$" filename) + (if (string-match "^\\([^:]+:[12],\\)\\(.*\\)$" filename) (let ((flaglist (string-to-char-list (elmo-match-string 2 filename)))) (unless (memq mark flaglist) (setq flaglist (sort (cons mark flaglist) '<)) (rename-file filename (concat (elmo-match-string 1 filename) - (char-list-to-string flaglist))))))) + (char-list-to-string flaglist))))) + ;; Rescue no info file in maildir. + (rename-file filename + (concat filename ":2," (char-to-string mark))))) (defun elmo-maildir-delete-mark (filename mark) "Mark the file in the maildir. MARK is a character." -- 1.7.10.4