X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fdired.c;h=e0639f9f656bf08cf5c4d7f034a1fc6f61068853;hb=a6f3dc9882f7eec7fbbe4700581bace298ab3335;hp=69142b7d24a574e16821ba41a9207576f689b7a9;hpb=98a6e4055a1fa624c592ac06f79287d55196ca37;p=chise%2Fxemacs-chise.git.1 diff --git a/src/dired.c b/src/dired.c index 69142b7..e0639f9 100644 --- a/src/dired.c +++ b/src/dired.c @@ -33,6 +33,7 @@ Boston, MA 02111-1307, USA. */ #include "elhash.h" #include "regex.h" #include "opaque.h" +#include "syntax.h" Lisp_Object Vcompletion_ignored_extensions; Lisp_Object Qdirectory_files; @@ -110,7 +111,7 @@ If FILES-ONLY is the symbol t, then only the "files" in the directory /* 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 @@ -123,6 +124,10 @@ If FILES-ONLY is the symbol t, then only the "files" in the directory 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 */ @@ -213,11 +218,6 @@ is not applied to the names of directories. 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)) { @@ -736,6 +736,9 @@ make_directory_hash_table (const char *path) return Qnil; } +#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) { @@ -745,6 +748,7 @@ 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. @@ -831,9 +835,9 @@ If file does not exist, returns nil. 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! */ @@ -890,8 +894,7 @@ vars_of_dired (void) *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; }