On 7/4/05, Juri Linkov <[EMAIL PROTECTED]> wrote:

> with this function
> 
> (assoc-delete-all "." (assoc-delete-all ".." file-alist1))
> 
> Even better would be to allow a test function like in assoc-default:
> 
> (assoc-delete-all nil file-alist1 (lambda (key) (string-match "^\.\.?$" key)))

That's one of these things that would be much easier if we could use CL:

 ; Not a particularly good implementation, but...
 (defun assoc-delete-all (key alist &rest keywords)
  (or keywords (setq keywords (list ':test 'eq )))
  (apply #'remove* key alist :key #'car keywords))

and you could do

 (assoc-delete-all "^\.\.?$" file-alist1
                   :test #'(lambda (test item)
                             (string-match test item)))

<sigh> :-)

-- 
                    /L/e/k/t/u


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to