[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: `read-file-name' with history?
From: |
Drew Adams |
Subject: |
RE: `read-file-name' with history? |
Date: |
Thu, 9 Dec 2010 20:13:10 -0800 |
> unlike `read-string', `read-file-name' lacks an history parameter. Is
> there a way to achieve such behavior?
Correct, there is no history parameter. But it does use a history list:
`file-name-history'.
To achieve a file-name reading behavior with an arbitrary history list, you
would need to write your own file-name reading function and bind it to the
variable `read-file-name-function'. Then let-bind that var around a call to
`read-file-name.
> Since `read-string' is a built-in function in C source code, I can't
> examine it (well, I could examine the C sources, but I think it would
> be a little difficult).
What is the question here? What is the relation to your question about
`read-file-name''s history parameter?