diff lisp/minibuf.el @ 5267:668c73e222fd

Change forms like (delq nil (mapcar ...)) to (mapcan ...). lisp/ChangeLog addition: 2010-09-16 Aidan Kehoe <kehoea@parhasard.net> * x-faces.el (x-available-font-sizes): * specifier.el (let-specifier): * package-ui.el (pui-add-required-packages): * msw-faces.el (mswindows-available-font-sizes): * modeline.el (modeline-minor-mode-menu): * minibuf.el (minibuf-directory-files): Replace the O2N (delq nil (mapcar (lambda (W) (and X Y)) Z)) with the ON (mapcan (lambda (W) (and X (list Y))) Z) in these files.
author Aidan Kehoe <kehoea@parhasard.net>
date Thu, 16 Sep 2010 15:06:38 +0100
parents fd36a980d701
children f00192e1cd49 308d34e9f07d
line wrap: on
line diff
--- a/lisp/minibuf.el	Thu Sep 16 14:31:40 2010 +0100
+++ b/lisp/minibuf.el	Thu Sep 16 15:06:38 2010 +0100
@@ -1569,12 +1569,13 @@
 (defun minibuf-directory-files (dir &optional match-regexp files-only)
   (let ((want-file (or (eq files-only nil) (eq files-only t)))
         (want-dirs (or (eq files-only nil) (not (eq files-only t)))))
-    (delete nil
-            (mapcar (function (lambda (f)
-                                (if (file-directory-p (expand-file-name f dir))
-                                    (and want-dirs (file-name-as-directory f))
-                                  (and want-file f))))
-                    (delete "." (directory-files dir nil match-regexp))))))
+    (mapcan
+     #'(lambda (f)
+         (and (not (equal "." f))
+              (if (file-directory-p (expand-file-name f dir))
+                  (and want-dirs (list (file-name-as-directory f)))
+                (and want-file (list f)))))
+     (directory-files dir nil match-regexp))))
 
 
 (defun read-file-name-2 (history prompt dir default