diff options
| author | Richard M. Stallman | 2007-01-30 23:49:33 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2007-01-30 23:49:33 +0000 |
| commit | 3372a51b2d5e241d657866da7bf130a573057a03 (patch) | |
| tree | 59512e911e8a80f25abbff09f14860063afdf662 /src | |
| parent | 5a192d7c8ad3ac7c9e15bf08d3e7dd655533cfd2 (diff) | |
| download | emacs-3372a51b2d5e241d657866da7bf130a573057a03.tar.gz emacs-3372a51b2d5e241d657866da7bf130a573057a03.zip | |
(read_minibuf): Save and clear Vminibuffer_completing_file_name.
(read_minibuf_unwind): Restore it.
(Vminibuffer_completion_table, Qminibuffer_completion_table)
(Vminibuffer_completion_predicate, Qminibuffer_completion_predicate)
(Vminibuffer_completion_confirm, Qminibuffer_completion_confirm)
(Vminibuffer_completing_file_name): Definitions moved up.
Diffstat (limited to 'src')
| -rw-r--r-- | src/minibuf.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/minibuf.c b/src/minibuf.c index 95b1b7fe86c..6581159e841 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -135,6 +135,11 @@ static Lisp_Object last_exact_completion; | |||
| 135 | /* Keymap for reading expressions. */ | 135 | /* Keymap for reading expressions. */ |
| 136 | Lisp_Object Vread_expression_map; | 136 | Lisp_Object Vread_expression_map; |
| 137 | 137 | ||
| 138 | Lisp_Object Vminibuffer_completion_table, Qminibuffer_completion_table; | ||
| 139 | Lisp_Object Vminibuffer_completion_predicate, Qminibuffer_completion_predicate; | ||
| 140 | Lisp_Object Vminibuffer_completion_confirm, Qminibuffer_completion_confirm; | ||
| 141 | Lisp_Object Vminibuffer_completing_file_name; | ||
| 142 | |||
| 138 | Lisp_Object Quser_variable_p; | 143 | Lisp_Object Quser_variable_p; |
| 139 | 144 | ||
| 140 | Lisp_Object Qminibuffer_default; | 145 | Lisp_Object Qminibuffer_default; |
| @@ -571,7 +576,9 @@ read_minibuf (map, initial, prompt, backup_n, expflag, | |||
| 571 | specpdl slots. */ | 576 | specpdl slots. */ |
| 572 | minibuf_save_list | 577 | minibuf_save_list |
| 573 | = Fcons (Voverriding_local_map, | 578 | = Fcons (Voverriding_local_map, |
| 574 | Fcons (minibuf_window, minibuf_save_list)); | 579 | Fcons (minibuf_window, |
| 580 | Fcons (Vminibuffer_completing_file_name, | ||
| 581 | minibuf_save_list))); | ||
| 575 | minibuf_save_list | 582 | minibuf_save_list |
| 576 | = Fcons (minibuf_prompt, | 583 | = Fcons (minibuf_prompt, |
| 577 | Fcons (make_number (minibuf_prompt_width), | 584 | Fcons (make_number (minibuf_prompt_width), |
| @@ -597,6 +604,9 @@ read_minibuf (map, initial, prompt, backup_n, expflag, | |||
| 597 | Vminibuffer_history_position = histpos; | 604 | Vminibuffer_history_position = histpos; |
| 598 | Vminibuffer_history_variable = histvar; | 605 | Vminibuffer_history_variable = histvar; |
| 599 | Vhelp_form = Vminibuffer_help_form; | 606 | Vhelp_form = Vminibuffer_help_form; |
| 607 | /* If this minibuffer is reading a file name, | ||
| 608 | that doesn't mean recursive ones are. */ | ||
| 609 | Vminibuffer_completing_file_name = Qnil; | ||
| 600 | 610 | ||
| 601 | if (inherit_input_method) | 611 | if (inherit_input_method) |
| 602 | { | 612 | { |
| @@ -918,6 +928,8 @@ read_minibuf_unwind (data) | |||
| 918 | minibuf_window = temp; | 928 | minibuf_window = temp; |
| 919 | #endif | 929 | #endif |
| 920 | minibuf_save_list = Fcdr (minibuf_save_list); | 930 | minibuf_save_list = Fcdr (minibuf_save_list); |
| 931 | Vminibuffer_completing_file_name = Fcar (minibuf_save_list); | ||
| 932 | minibuf_save_list = Fcdr (minibuf_save_list); | ||
| 921 | 933 | ||
| 922 | /* Erase the minibuffer we were using at this level. */ | 934 | /* Erase the minibuffer we were using at this level. */ |
| 923 | { | 935 | { |
| @@ -1684,11 +1696,6 @@ are ignored unless STRING itself starts with a space. */) | |||
| 1684 | return Fnreverse (allmatches); | 1696 | return Fnreverse (allmatches); |
| 1685 | } | 1697 | } |
| 1686 | 1698 | ||
| 1687 | Lisp_Object Vminibuffer_completion_table, Qminibuffer_completion_table; | ||
| 1688 | Lisp_Object Vminibuffer_completion_predicate, Qminibuffer_completion_predicate; | ||
| 1689 | Lisp_Object Vminibuffer_completion_confirm, Qminibuffer_completion_confirm; | ||
| 1690 | Lisp_Object Vminibuffer_completing_file_name; | ||
| 1691 | |||
| 1692 | DEFUN ("completing-read", Fcompleting_read, Scompleting_read, 2, 8, 0, | 1699 | DEFUN ("completing-read", Fcompleting_read, Scompleting_read, 2, 8, 0, |
| 1693 | doc: /* Read a string in the minibuffer, with completion. | 1700 | doc: /* Read a string in the minibuffer, with completion. |
| 1694 | PROMPT is a string to prompt with; normally it ends in a colon and a space. | 1701 | PROMPT is a string to prompt with; normally it ends in a colon and a space. |