From: Stefan Monnier Date: Mon, 4 Jul 2011 20:08:02 +0000 (-0400) Subject: * lisp/pcmpl-linux.el (pcomplete-pare-list): Re-add, from pcomplete.el. X-Git-Tag: emacs-pretest-24.0.90~104^2~152^2~186 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8fa396153bd5d8d3185c56cfbe4462c56451f275;p=emacs.git * lisp/pcmpl-linux.el (pcomplete-pare-list): Re-add, from pcomplete.el. Fixes: debbugs:8958 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4532eb64d9c..a3c69ee76d5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-07-04 Stefan Monnier + + * pcmpl-linux.el (pcomplete-pare-list): Re-add, from pcomplete.el + (bug#8958). + 2011-07-04 Chong Yidong * font-lock.el (font-lock-builtin-face): Change light background diff --git a/lisp/pcmpl-linux.el b/lisp/pcmpl-linux.el index 8090397627e..d75479fab3e 100644 --- a/lisp/pcmpl-linux.el +++ b/lisp/pcmpl-linux.el @@ -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)