🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Toshiaki Shingu Wed, 06 Jan 1993 09:52
read-file-name bug?
#923
Author: Toshiaki Shingu
Date: Wed, 06 Jan 1993 09:52
42 lines
1760 bytes
	I use mule (multiligual emacs) which is based on
emacs 18.58.
When I typed "C-x C-f" at "+inbox" buffer of mh-e, a prompt
"Find file: ~/" appered on minibuffer.   Emacs reads the
directory "~/Mail/inbox" in spite of minibuffer indicates "~/"
when I type just return.   I tried to find the cause of
this, I found read-file-name has a problem.  This is not a
problem of mule but emacs.

Find-file calls "call-interactively" defind at callint.c.
Then read-file-name is called with set defalt (3rd arg.) by nil.

<callint.c>
339	case 'F':		/* Possibly nonexistent file name. */
340	  args[i] = Fread_file_name (build_string (prompt),
341				     Qnil, Qnil, Qnil);
342	  break;

Next, the value of "defalt" is reset by the directory of
current buffer.

<fileio.c>
2568  if (NULL (defalt))
2569    defalt = current_buffer->filename;

I think these two lines are unnecessary, because there is
the code when "defalt" is nil as shown below.

<fileio.c>
2611  tem = Fstring_equal (val, insdef);
2612  if (!NULL (tem) && !NULL (defalt))
2613    return defalt;
2614  return Fsubstitute_in_file_name (val);

I deleted the lines 2568-2569 of fileio.c.
When emacs displays the prompt "Find file: ~/" and I typed
return, emacs reads the directory "~/" correctly.

Thanks in advance.

--
Toshiaki SHINGU
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads