X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/4787a496a05fdc03241850b45911dd283d4b06b8..b336bfcdf39f1e4d35bff4a7bd01d3b4bca8f516:/lisp/pcmpl-linux.el?ds=sidebyside diff --git a/lisp/pcmpl-linux.el b/lisp/pcmpl-linux.el index 74a696e7c1..67ef8e76aa 100644 --- a/lisp/pcmpl-linux.el +++ b/lisp/pcmpl-linux.el @@ -1,7 +1,7 @@ ;;; pcmpl-linux.el --- functions for dealing with GNU/Linux completions ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. @@ -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."