comparison src/fileio.c @ 22658:9f320d762e2f

(Faccess_file): Check type of second argument STRING. (Fread_file_name): Bind minibuffer-completing-file-name to t.
author Richard M. Stallman <rms@gnu.org>
date Thu, 02 Jul 1998 07:01:56 +0000
parents 285822d24189
children ad4d9aae0a33
comparison
equal deleted inserted replaced
22657:d19cd2986f18 22658:9f320d762e2f
2945 { 2945 {
2946 Lisp_Object handler, encoded_filename; 2946 Lisp_Object handler, encoded_filename;
2947 int fd; 2947 int fd;
2948 2948
2949 CHECK_STRING (filename, 0); 2949 CHECK_STRING (filename, 0);
2950 CHECK_STRING (string, 1);
2950 2951
2951 /* If the file name has special constructs in it, 2952 /* If the file name has special constructs in it,
2952 call the corresponding file handler. */ 2953 call the corresponding file handler. */
2953 handler = Ffind_file_name_handler (filename, Qaccess_file); 2954 handler = Ffind_file_name_handler (filename, Qaccess_file);
2954 if (!NILP (handler)) 2955 if (!NILP (handler))
5361 insdef1 = Fcons (double_dollars (insdef), make_number (0)); 5362 insdef1 = Fcons (double_dollars (insdef), make_number (0));
5362 } 5363 }
5363 else 5364 else
5364 insdef = Qnil, insdef1 = Qnil; 5365 insdef = Qnil, insdef1 = Qnil;
5365 5366
5367 count = specpdl_ptr - specpdl;
5366 #ifdef VMS 5368 #ifdef VMS
5367 count = specpdl_ptr - specpdl;
5368 specbind (intern ("completion-ignore-case"), Qt); 5369 specbind (intern ("completion-ignore-case"), Qt);
5369 #endif 5370 #endif
5371
5372 specbind (intern ("minibuffer-completing-file-name"), Qt);
5370 5373
5371 GCPRO2 (insdef, default_filename); 5374 GCPRO2 (insdef, default_filename);
5372 val = Fcompleting_read (prompt, intern ("read-file-name-internal"), 5375 val = Fcompleting_read (prompt, intern ("read-file-name-internal"),
5373 dir, mustmatch, insdef1, 5376 dir, mustmatch, insdef1,
5374 Qfile_name_history, default_filename, Qnil); 5377 Qfile_name_history, default_filename, Qnil);
5390 add_to_history = 1; 5393 add_to_history = 1;
5391 5394
5392 val = build_string (""); 5395 val = build_string ("");
5393 } 5396 }
5394 5397
5395 #ifdef VMS
5396 unbind_to (count, Qnil); 5398 unbind_to (count, Qnil);
5397 #endif
5398
5399 UNGCPRO; 5399 UNGCPRO;
5400 if (NILP (val)) 5400 if (NILP (val))
5401 error ("No file name specified"); 5401 error ("No file name specified");
5402 5402
5403 tem = Fstring_equal (val, insdef); 5403 tem = Fstring_equal (val, insdef);