home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / gnu / emacs / bug / 1605 < prev    next >
Encoding:
Text File  |  1993-01-07  |  1.7 KB  |  56 lines

  1. Newsgroups: gnu.emacs.bug
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!cpr.CAnon.co.JP!shingu
  3. From: shingu@cpr.CAnon.co.JP (Toshiaki Shingu)
  4. Subject: read-file-name bug?
  5. Message-ID: <SHINGU.93Jan6185239@casp12.cpr.canon.co.jp>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: Canon Inc., Tokyo, Japan
  8. Distribution: gnu
  9. Date: Wed, 6 Jan 1993 09:52:39 GMT
  10. Approved: bug-gnu-emacs@prep.ai.mit.edu
  11. Lines: 43
  12.  
  13.     I use mule (multiligual emacs) which is based on
  14. emacs 18.58.
  15. When I typed "C-x C-f" at "+inbox" buffer of mh-e, a prompt
  16. "Find file: ~/" appered on minibuffer.   Emacs reads the
  17. directory "~/Mail/inbox" in spite of minibuffer indicates "~/"
  18. when I type just return.   I tried to find the cause of
  19. this, I found read-file-name has a problem.  This is not a
  20. problem of mule but emacs.
  21.  
  22. Find-file calls "call-interactively" defind at callint.c.
  23. Then read-file-name is called with set defalt (3rd arg.) by nil.
  24.  
  25. <callint.c>
  26. 339    case 'F':        /* Possibly nonexistent file name. */
  27. 340      args[i] = Fread_file_name (build_string (prompt),
  28. 341                     Qnil, Qnil, Qnil);
  29. 342      break;
  30.  
  31. Next, the value of "defalt" is reset by the directory of
  32. current buffer.
  33.  
  34. <fileio.c>
  35. 2568  if (NULL (defalt))
  36. 2569    defalt = current_buffer->filename;
  37.  
  38. I think these two lines are unnecessary, because there is
  39. the code when "defalt" is nil as shown below.
  40.  
  41. <fileio.c>
  42. 2611  tem = Fstring_equal (val, insdef);
  43. 2612  if (!NULL (tem) && !NULL (defalt))
  44. 2613    return defalt;
  45. 2614  return Fsubstitute_in_file_name (val);
  46.  
  47. I deleted the lines 2568-2569 of fileio.c.
  48. When emacs displays the prompt "Find file: ~/" and I typed
  49. return, emacs reads the directory "~/" correctly.
  50.  
  51. Thanks in advance.
  52.  
  53. --
  54. Toshiaki SHINGU
  55.  
  56.