]> code.delx.au - gnu-emacs/blobdiff - lisp/pcmpl-linux.el
Simplify ‘delete-trailing-whitespace’ by not treating \n as whitespace
[gnu-emacs] / lisp / pcmpl-linux.el
index 8090397627e2e6ca880c655ff6a0203838cd94b4..3cb38b95c78e44b4777b76ce15c6dc2729cfb000 100644 (file)
@@ -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-2016 Free Software Foundation, Inc.
 
 ;; Package: pcomplete
 
 
 (require 'pcomplete)
 
-(defgroup pcmpl-linux nil
-  "Functions for dealing with GNU/Linux completions."
-  :group 'pcomplete)
+;; Unused.
+;;; (defgroup pcmpl-linux nil
+;;;   "Functions for dealing with GNU/Linux completions."
+;;;   :group 'pcomplete)
 
 ;; Functions:
 
          (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)