X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/db0406bb64f7e5dceeb257c7e350f1e80ed9c1c1..64f8c4bd616e110defc092ca8370739e34bbe183:/lisp/pcmpl-linux.el diff --git a/lisp/pcmpl-linux.el b/lisp/pcmpl-linux.el index 8090397627..10e762132d 100644 --- a/lisp/pcmpl-linux.el +++ b/lisp/pcmpl-linux.el @@ -1,6 +1,6 @@ ;;; pcmpl-linux.el --- functions for dealing with GNU/Linux completions -;; Copyright (C) 1999-2011 Free Software Foundation, Inc. +;; Copyright (C) 1999-2012 Free Software Foundation, Inc. ;; Package: pcomplete @@ -83,6 +83,19 @@ (forward-line))) (pcomplete-uniqify-list points)))) +(defun pcomplete-pare-list (l r) + "Destructively remove from list L all elements matching any in list R. +Test is done using `equal'." + (while (and l (and r (member (car l) r))) + (setq l (cdr l))) + (let ((m l)) + (while m + (while (and (cdr m) + (and r (member (cadr m) r))) + (setcdr m (cddr m))) + (setq m (cdr m)))) + l) + (defun pcmpl-linux-mountable-directories () "Return a list of mountable directory names." (let (points)