help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

read-file-name() doesn't care about PREDICATE argument


From: Nordlöw
Subject: read-file-name() doesn't care about PREDICATE argument
Date: Tue, 04 May 2010 15:42:38 -0000
User-agent: G2/1.0

Why is the argument PREDICATE not used in read-file-name?

For example
  (read-file-name "Find file: " "~/" nil t nil (lambda (filename)
nil))
incorrectly completes everything for me when it shouldn't complete
anything at all since the PREDICATE function always returns nil.

I have also tried the Icicles version
  (icicle-read-file-name "Find file: " "~/" nil t nil (lambda
(filename) nil))
but it behaves exactly the same.

The following code works as expected, though:
  (let ((icicle-must-pass-predicate (lambda (filename) nil)))
        (icicle-read-file-name "Find file: " "~/" nil t nil (lambda
(filename) nil)))

Why doesn't first two example like the last? And why does the icicle
version provide this extra variable? It smells like a bug or a missing
feature.

/Nordlöw


reply via email to

[Prev in Thread] Current Thread [Next in Thread]