Commit 48c23a25 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(pcomplete/kill): Don't abuse pcomplete-entries.

(pcmpl-linux-fs-types): Same, and update to new modules layout.
parent 56b14058
2009-10-22 Stefan Monnier <monnier@iro.umontreal.ca>
* pcmpl-linux.el (pcomplete/kill): Don't abuse pcomplete-entries.
(pcmpl-linux-fs-types): Same, and update to new modules layout.
* pcmpl-gnu.el (pcmpl-gnu-makefile-names): Use a single call to
pcomplete-entries.
......
......@@ -47,9 +47,7 @@
(pcomplete-match-string 1 0)))
(while (pcomplete-here
(if (file-directory-p "/proc")
(let ((default-directory "/proc/"))
(mapcar 'directory-file-name
(pcomplete-entries "[0-9]+/$"))))
(directory-files "/proc" nil "\\`[0-9]+\\'"))
nil 'identity)))
;;;###autoload
......@@ -68,13 +66,8 @@
(defun pcmpl-linux-fs-types ()
"Return a list of available fs modules on GNU/Linux systems."
(let ((kernel-ver (pcomplete-process-result "uname" "-r")))
(mapcar
(function
(lambda (fsobj)
(substring fsobj 0 (- (length fsobj) 2))))
(let ((default-directory
(concat "/lib/modules/" kernel-ver "/fs/")))
(pcomplete-entries "\\.o$")))))
(directory-files
(concat "/lib/modules/" kernel-ver "/kernel/fs/"))))
(defun pcmpl-linux-mounted-directories ()
"Return a list of mounted directory names."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment