changeset 45547:a227ea81fd67

*** empty log message ***
author Kim F. Storm <storm@cua.dk>
date Mon, 27 May 2002 22:14:52 +0000
parents ce01a38706ee
children 612208417377
files etc/NEWS src/ChangeLog
diffstat 2 files changed, 28 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/etc/NEWS	Mon May 27 22:06:29 2002 +0000
+++ b/etc/NEWS	Mon May 27 22:14:52 2002 +0000
@@ -786,6 +786,15 @@
 
 * Lisp Changes in Emacs 21.4
 
+** The `read-file-name' function now takes an additional argument which
+specifies a predicate which the file name read must satify.  The
+new variable `read-file-name-predicate' contains the predicate argument
+while reading the file name from the minibuffer; the predicate in this
+variable is used by read-file-name-internal to filter the completion list.
+
+** The new variable `read-file-name-function' can be used by lisp code
+to override the internal read-file-name function.
+
 ** The New lisp library fringe.el controls the apperance of fringes.
 
 ** The `defmacro' form may contain declarations specifying how to
--- a/src/ChangeLog	Mon May 27 22:06:29 2002 +0000
+++ b/src/ChangeLog	Mon May 27 22:14:52 2002 +0000
@@ -1,3 +1,22 @@
+2002-05-28  Kim F. Storm  <storm@cua.dk>
+
+	* fileio.c: (Vread_file_name_function, Vread_file_name_predicate):
+	New variables.
+	(syms_of_fileio): DEFVAR_LISP them.
+	(read_file_name_cleanup): New unwind function.
+	(Fread_file_name_internal): Only return completions satifying
+	Vread_file_name_predicate.  Temporarily unwind protect and rebind
+	default-directory while checking completions against the predicate.
+	(Fread_file_name): Added PREDICATE argument.  Specbind it to
+	Vread_file_name_predicate during completion.
+	Call Vread_file_name_function to read the file name if non-nil.
+
+	* lisp.h (Fread_file_name): Now has 6 args.
+	
+	* callint.c (Fcall_interactively) <"D">: Supply Qfile_directory_p
+	predicate for Fread_file_name when reading directory name.
+	Supply Qnil for predicate in other calls to Fread_file_name.
+
 2002-05-26  Miles Bader  <miles@gnu.org>
 
 	* term.c (tty_capable_p): New function.