diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/fileio.c | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index a402a195225..c9bff1a7e29 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2008-04-21 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * fileio.c (Qdefault_directory): New variable. | ||
| 4 | (Fread_file_name): Use it to pass `dir' to the completion functions. | ||
| 5 | |||
| 1 | 2008-04-20 Chong Yidong <cyd@stupidchicken.com> | 6 | 2008-04-20 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 7 | ||
| 3 | * xdisp.c (pos_visible_p): Check if iterator stops on a display string. | 8 | * xdisp.c (pos_visible_p): Check if iterator stops on a display string. |
diff --git a/src/fileio.c b/src/fileio.c index a63ac6dd748..738dd266780 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -6156,6 +6156,8 @@ before any other event (mouse or keypress) is handeled. */) | |||
| 6156 | return Qnil; | 6156 | return Qnil; |
| 6157 | } | 6157 | } |
| 6158 | 6158 | ||
| 6159 | Lisp_Object Qdefault_directory; | ||
| 6160 | |||
| 6159 | DEFUN ("read-file-name", Fread_file_name, Sread_file_name, 1, 6, 0, | 6161 | DEFUN ("read-file-name", Fread_file_name, Sread_file_name, 1, 6, 0, |
| 6160 | doc: /* Read file name, prompting with PROMPT and completing in directory DIR. | 6162 | doc: /* Read file name, prompting with PROMPT and completing in directory DIR. |
| 6161 | Value is not expanded---you must call `expand-file-name' yourself. | 6163 | Value is not expanded---you must call `expand-file-name' yourself. |
| @@ -6279,6 +6281,8 @@ and `read-file-name-function'. */) | |||
| 6279 | } | 6281 | } |
| 6280 | 6282 | ||
| 6281 | count = SPECPDL_INDEX (); | 6283 | count = SPECPDL_INDEX (); |
| 6284 | specbind (Qdefault_directory, | ||
| 6285 | Ffile_name_as_directory (Fexpand_file_name (dir, Qnil))); | ||
| 6282 | specbind (Qcompletion_ignore_case, | 6286 | specbind (Qcompletion_ignore_case, |
| 6283 | read_file_name_completion_ignore_case ? Qt : Qnil); | 6287 | read_file_name_completion_ignore_case ? Qt : Qnil); |
| 6284 | specbind (intern ("minibuffer-completing-file-name"), Qt); | 6288 | specbind (intern ("minibuffer-completing-file-name"), Qt); |
| @@ -6307,7 +6311,7 @@ and `read-file-name-function'. */) | |||
| 6307 | else | 6311 | else |
| 6308 | #endif | 6312 | #endif |
| 6309 | val = Fcompleting_read (prompt, intern ("read-file-name-internal"), | 6313 | val = Fcompleting_read (prompt, intern ("read-file-name-internal"), |
| 6310 | dir, mustmatch, insdef, | 6314 | Qnil, mustmatch, insdef, |
| 6311 | Qfile_name_history, default_filename, Qnil); | 6315 | Qfile_name_history, default_filename, Qnil); |
| 6312 | 6316 | ||
| 6313 | tem = Fsymbol_value (Qfile_name_history); | 6317 | tem = Fsymbol_value (Qfile_name_history); |
| @@ -6484,6 +6488,8 @@ of file names regardless of the current language environment. */); | |||
| 6484 | 6488 | ||
| 6485 | Qformat_decode = intern ("format-decode"); | 6489 | Qformat_decode = intern ("format-decode"); |
| 6486 | staticpro (&Qformat_decode); | 6490 | staticpro (&Qformat_decode); |
| 6491 | Qdefault_directory = intern ("default-directory"); | ||
| 6492 | staticpro (&Qdefault_directory); | ||
| 6487 | Qformat_annotate_function = intern ("format-annotate-function"); | 6493 | Qformat_annotate_function = intern ("format-annotate-function"); |
| 6488 | staticpro (&Qformat_annotate_function); | 6494 | staticpro (&Qformat_annotate_function); |
| 6489 | Qafter_insert_file_set_coding = intern ("after-insert-file-set-coding"); | 6495 | Qafter_insert_file_set_coding = intern ("after-insert-file-set-coding"); |