From 48c23a25228da75b715e67bc5f0f26d12cc0ed67 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 22 Oct 2009 03:35:11 +0000 Subject: [PATCH] (pcomplete/kill): Don't abuse pcomplete-entries. (pcmpl-linux-fs-types): Same, and update to new modules layout. --- lisp/ChangeLog | 3 +++ lisp/pcmpl-linux.el | 13 +++---------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 95ab875f504..5c056104bb1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2009-10-22 Stefan Monnier + * 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. 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." -- 2.39.2