comparison 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
comparison
equal deleted inserted replaced
5266:f9ec07abdbf9 5267:668c73e222fd
1567 ;; option, so it has to be faked. The listing cache will hopefully 1567 ;; option, so it has to be faked. The listing cache will hopefully
1568 ;; improve the performance of this operation. 1568 ;; improve the performance of this operation.
1569 (defun minibuf-directory-files (dir &optional match-regexp files-only) 1569 (defun minibuf-directory-files (dir &optional match-regexp files-only)
1570 (let ((want-file (or (eq files-only nil) (eq files-only t))) 1570 (let ((want-file (or (eq files-only nil) (eq files-only t)))
1571 (want-dirs (or (eq files-only nil) (not (eq files-only t))))) 1571 (want-dirs (or (eq files-only nil) (not (eq files-only t)))))
1572 (delete nil 1572 (mapcan
1573 (mapcar (function (lambda (f) 1573 #'(lambda (f)
1574 (if (file-directory-p (expand-file-name f dir)) 1574 (and (not (equal "." f))
1575 (and want-dirs (file-name-as-directory f)) 1575 (if (file-directory-p (expand-file-name f dir))
1576 (and want-file f)))) 1576 (and want-dirs (list (file-name-as-directory f)))
1577 (delete "." (directory-files dir nil match-regexp)))))) 1577 (and want-file (list f)))))
1578 (directory-files dir nil match-regexp))))
1578 1579
1579 1580
1580 (defun read-file-name-2 (history prompt dir default 1581 (defun read-file-name-2 (history prompt dir default
1581 must-match initial-contents 1582 must-match initial-contents
1582 completer) 1583 completer)