From 8fa396153bd5d8d3185c56cfbe4462c56451f275 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 4 Jul 2011 16:08:02 -0400 Subject: [PATCH] * lisp/pcmpl-linux.el (pcomplete-pare-list): Re-add, from pcomplete.el. Fixes: debbugs:8958 --- lisp/ChangeLog | 5 +++++ lisp/pcmpl-linux.el | 13 +++++++++++++ 2 files changed, 18 insertions(+) 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) -- 2.39.2