#include "elhash.h"
#include "regex.h"
#include "opaque.h"
+#include "syntax.h"
Lisp_Object Vcompletion_ignored_extensions;
Lisp_Object Qdirectory_files;
/* MATCH might be a flawed regular expression. Rather than
catching and signalling our own errors, we just call
compile_pattern to do the work for us. */
- bufp = compile_pattern (match, 0, 0, 0, ERROR_ME);
+ bufp = compile_pattern (match, 0, Qnil, 0, ERROR_ME);
}
/* Now *bufp is the compiled form of MATCH; don't call anything
if (!d)
report_file_error ("Opening directory", list1 (directory));
+ /* #### In Matt's code, this was Qt. Why? */
+ regex_match_object = Qnil;
+ regex_emacs_buffer = current_buffer;
+
record_unwind_protect (close_directory_unwind, make_opaque_ptr ((void *)d));
/* Loop reading blocks */
DEFUN ("file-name-all-completions", Ffile_name_all_completions, 2, 2, 0, /*
Return a list of all completions of PARTIAL-FILENAME in DIRECTORY.
These are all file names in DIRECTORY which begin with PARTIAL-FILENAME.
-
-File names which end with any member of `completion-ignored-extensions'
-are not considered as possible completions for PARTIAL-FILENAME unless
-there is no other possible completion. `completion-ignored-extensions'
-is not applied to the names of directories.
*/
(partial_filename, directory))
{
return Qnil;
}
\f
+#if 0
+/* ... never used ... should use list2 directly anyway ... */
+/* NOTE: This function can never return a negative value. */
Lisp_Object
wasteful_word_to_lisp (unsigned int item)
{
XCDR (cons) = Fcons (XCDR (cons), Qnil);
return cons;
}
+#endif
DEFUN ("file-attributes", Ffile_attributes, 1, 1, 0, /*
Return a list of attributes of file FILENAME.
values[1] = make_int (s.st_nlink);
values[2] = make_int (s.st_uid);
values[3] = make_int (s.st_gid);
- values[4] = wasteful_word_to_lisp (s.st_atime);
- values[5] = wasteful_word_to_lisp (s.st_mtime);
- values[6] = wasteful_word_to_lisp (s.st_ctime);
+ values[4] = make_time (s.st_atime);
+ values[5] = make_time (s.st_mtime);
+ values[6] = make_time (s.st_ctime);
values[7] = make_int ((EMACS_INT) s.st_size);
/* If the size is out of range, give back -1. */
/* #### Fix when Emacs gets bignums! */
*Completion ignores filenames ending in any string in this list.
This variable does not affect lists of possible completions,
but does affect the commands that actually do completions.
-It is used by the functions `file-name-completion' and
-`file-name-all-completions'.
+It is used by the function `file-name-completion'.
*/ );
Vcompletion_ignored_extensions = Qnil;
}