summaryrefslogtreecommitdiff
path: root/lisp/pcmpl-linux.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2009-10-22 03:35:11 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2009-10-22 03:35:11 +0000
commit48c23a25228da75b715e67bc5f0f26d12cc0ed67 (patch)
tree47c43ef83e795ea8fc4a2dd43ad85370e0f469bf /lisp/pcmpl-linux.el
parent56b14058a411bfc742848c03c13323c61ac9ff8a (diff)
downloademacs-48c23a25228da75b715e67bc5f0f26d12cc0ed67.tar.gz
(pcomplete/kill): Don't abuse pcomplete-entries.
(pcmpl-linux-fs-types): Same, and update to new modules layout.
Diffstat (limited to 'lisp/pcmpl-linux.el')
-rw-r--r--lisp/pcmpl-linux.el13
1 files changed, 3 insertions, 10 deletions
diff --git a/lisp/pcmpl-linux.el b/lisp/pcmpl-linux.el
index 5761b980735..3543491dac8 100644
--- a/lisp/pcmpl-linux.el
+++ b/lisp/pcmpl-linux.el
@@ -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."