diff options
| author | Karl Heuer | 1994-03-03 21:01:37 +0000 |
|---|---|---|
| committer | Karl Heuer | 1994-03-03 21:01:37 +0000 |
| commit | 351bd676ba0e7ba666ccf3234415448e17565245 (patch) | |
| tree | a378b15e26216f1fd5939abf08022ef3ebee4182 /src | |
| parent | 4e665715b9645a4c381f66f01c2cf5f93f97aabc (diff) | |
| download | emacs-351bd676ba0e7ba666ccf3234415448e17565245.tar.gz emacs-351bd676ba0e7ba666ccf3234415448e17565245.zip | |
(Fread_file_name): Do the right thing when insert-default-directory is nil.
Allow for doubled dollar signs in dir when computing pos.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fileio.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/fileio.c b/src/fileio.c index a95c9847910..3b1513600e2 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -3704,7 +3704,6 @@ DIR defaults to current buffer's directory default.") | |||
| 3704 | if (insert_default_directory) | 3704 | if (insert_default_directory) |
| 3705 | { | 3705 | { |
| 3706 | insdef = dir; | 3706 | insdef = dir; |
| 3707 | insdef1 = dir; | ||
| 3708 | if (!NILP (initial)) | 3707 | if (!NILP (initial)) |
| 3709 | { | 3708 | { |
| 3710 | Lisp_Object args[2], pos; | 3709 | Lisp_Object args[2], pos; |
| @@ -3712,12 +3711,17 @@ DIR defaults to current buffer's directory default.") | |||
| 3712 | args[0] = insdef; | 3711 | args[0] = insdef; |
| 3713 | args[1] = initial; | 3712 | args[1] = initial; |
| 3714 | insdef = Fconcat (2, args); | 3713 | insdef = Fconcat (2, args); |
| 3715 | pos = make_number (XSTRING (dir)->size); | 3714 | pos = make_number (XSTRING (double_dollars (dir))->size); |
| 3716 | insdef1 = Fcons (double_dollars (insdef), pos); | 3715 | insdef1 = Fcons (double_dollars (insdef), pos); |
| 3717 | } | 3716 | } |
| 3718 | else | 3717 | else |
| 3719 | insdef1 = double_dollars (insdef); | 3718 | insdef1 = double_dollars (insdef); |
| 3720 | } | 3719 | } |
| 3720 | else if (!NILP (initial)) | ||
| 3721 | { | ||
| 3722 | insdef = initial; | ||
| 3723 | insdef1 = Fcons (double_dollars (insdef), 0); | ||
| 3724 | } | ||
| 3721 | else | 3725 | else |
| 3722 | insdef = Qnil, insdef1 = Qnil; | 3726 | insdef = Qnil, insdef1 = Qnil; |
| 3723 | 3727 | ||