diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2011-07-04 16:08:02 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2011-07-04 16:08:02 -0400 |
commit | 8fa396153bd5d8d3185c56cfbe4462c56451f275 (patch) | |
tree | 6e987bc6de1afadce0315750c8130bad1956c20e /lisp/pcmpl-linux.el | |
parent | 2f11b3f1ced845106f0aac930337c6e38725918d (diff) | |
download | emacs-8fa396153bd5d8d3185c56cfbe4462c56451f275.tar.gz |
* lisp/pcmpl-linux.el (pcomplete-pare-list): Re-add, from pcomplete.el.
Fixes: debbugs:8958
Diffstat (limited to 'lisp/pcmpl-linux.el')
-rw-r--r-- | lisp/pcmpl-linux.el | 13 |
1 files changed, 13 insertions, 0 deletions
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) |