* wl-fldmgr.el (wl-fldmgr-add-completion-all-completions): Removed
authorteranisi <teranisi>
Tue, 18 Dec 2001 07:32:46 +0000 (07:32 +0000)
committerteranisi <teranisi>
Tue, 18 Dec 2001 07:32:46 +0000 (07:32 +0000)
comment out and fixed.
(wl-fldmgr-add-completion-subr): Ditto.

wl/ChangeLog
wl/wl-fldmgr.el

index e85d531..2f0a579 100644 (file)
@@ -1,5 +1,9 @@
 2001-12-18  Yuuichi Teranishi  <teranisi@gohome.org>
 
+       * wl-fldmgr.el (wl-fldmgr-add-completion-all-completions): Removed
+       comment out and fixed.
+       (wl-fldmgr-add-completion-subr): Ditto.
+
        * wl-summary.el (wl-summary-exit): Changed order of saving summary view
        and msgdb.
 
index b08ee38..71986d1 100644 (file)
@@ -751,57 +751,57 @@ return value is diffs '(-new -unread -all)."
 
 (defvar wl-fldmgr-add-completion-hashtb (make-vector 7 0))
 
-;(defun wl-fldmgr-add-completion-all-completions (string)
-;  (let ((table
-;       (catch 'found
-;         (mapatoms
-;          (function
-;           (lambda (atom)
-;             (if (string-match (symbol-name atom) string)
-;                 (throw 'found (symbol-value atom)))))
-;          wl-fldmgr-add-completion-hashtb)))
-;      (pattern
-;       (if (string-match "\\.$"
-;                         (car (elmo-network-get-spec
-;                               string nil nil nil nil)))
-;           (substring string 0 (match-beginning 0))
-;         (concat string nil))))
-;    (or table
-;      (setq table (elmo-folder-list-subfolders (wl-folder-get-elmo-folder
-;                                                pattern)))
-;      (and table
-;           (or (/= (length table) 1)
-;               (elmo-folder-exists-p (wl-folder-get-elmo-folder
-;                                      (car table)))))
-;      (setq pattern
-;            (if (string-match "\\.[^\\.]+$" string)
-;                (substring string 0 (match-beginning 0))
-;              (char-to-string (aref string 0)))
-;            table (elmo-folder-list-subfolders
-;                   (wl-folder-get-elmo-folder pattern))))
-;    (setq pattern (concat "^" (regexp-quote pattern)))
-;    (unless (intern-soft pattern wl-fldmgr-add-completion-hashtb)
-;      (set (intern pattern wl-fldmgr-add-completion-hashtb) table))
-;    table))
-
-;(defun wl-fldmgr-add-completion-subr (string predicate flag)
-;  (let ((table
-;       (if (string= string "")
-;           (mapcar (function (lambda (spec)
-;                               (list (char-to-string (car spec)))))
-;                   elmo-spec-alist)
-;         (when (assq (aref string 0) elmo-spec-alist)
-;           (delq nil (mapcar
-;                      (function list)
-;                      (condition-case nil
-;                          (wl-fldmgr-add-completion-all-completions string)
-;                        (error nil))))))))
-;    (if (null flag)
-;      (try-completion string table predicate)
-;      (if (eq flag 'lambda)
-;        (eq t (try-completion string table predicate))
-;      (if flag
-;          (all-completions string table predicate))))))
+(defun wl-fldmgr-add-completion-all-completions (string)
+  (let ((table
+        (catch 'found
+          (mapatoms
+           (function
+            (lambda (atom)
+              (if (string-match (symbol-name atom) string)
+                  (throw 'found (symbol-value atom)))))
+           wl-fldmgr-add-completion-hashtb)))
+       (pattern
+        (if (string-match "\\.$" 
+                          (elmo-folder-prefix-internal
+                           (wl-folder-get-elmo-folder string)))
+            (substring string 0 (match-beginning 0))
+          (concat string nil))))
+    (or table
+       (setq table (elmo-folder-list-subfolders
+                    (wl-folder-get-elmo-folder pattern)))
+       (and table
+            (or (/= (length table) 1)
+                (elmo-folder-exists-p (wl-folder-get-elmo-folder
+                                       (car table)))))
+       (setq pattern
+             (if (string-match "\\.[^\\.]+$" string)
+                 (substring string 0 (match-beginning 0))
+               (char-to-string (aref string 0)))
+             table (elmo-folder-list-subfolders
+                    (wl-folder-get-elmo-folder pattern))))
+    (setq pattern (concat "^" (regexp-quote pattern)))
+    (unless (intern-soft pattern wl-fldmgr-add-completion-hashtb)
+      (set (intern pattern wl-fldmgr-add-completion-hashtb) table))
+    table))
+
+(defun wl-fldmgr-add-completion-subr (string predicate flag)
+  (let ((table
+        (if (string= string "")
+            (mapcar (function (lambda (spec)
+                                (list (char-to-string (car spec)))))
+                    elmo-folder-type-alist)
+          (when (assq (aref string 0) elmo-folder-type-alist)
+            (delq nil (mapcar
+                       (function list)
+                       (condition-case nil
+                           (wl-fldmgr-add-completion-all-completions string)
+                         (error nil))))))))
+    (if (null flag)
+       (try-completion string table predicate)
+      (if (eq flag 'lambda)
+         (eq t (try-completion string table predicate))
+       (if flag
+           (all-completions string table predicate))))))
 
 (defun wl-fldmgr-add (&optional name)
   (interactive)