From: teranisi Date: Tue, 18 Dec 2001 07:32:46 +0000 (+0000) Subject: * wl-fldmgr.el (wl-fldmgr-add-completion-all-completions): Removed X-Git-Tag: wl-2_8_0pre2~8 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ef05a3f66f7cbb4299031f0291e34e344766d4c;p=elisp%2Fwanderlust.git * wl-fldmgr.el (wl-fldmgr-add-completion-all-completions): Removed comment out and fixed. (wl-fldmgr-add-completion-subr): Ditto. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index e85d531..2f0a579 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,5 +1,9 @@ 2001-12-18 Yuuichi Teranishi + * 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. diff --git a/wl/wl-fldmgr.el b/wl/wl-fldmgr.el index b08ee38..71986d1 100644 --- a/wl/wl-fldmgr.el +++ b/wl/wl-fldmgr.el @@ -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)