Mercurial > hg > xemacs-beta
comparison src/fileio.c @ 169:15872534500d r20-3b11
Import from CVS: tag r20-3b11
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:46:53 +0200 |
parents | 85ec50267440 |
children | 8eaf7971accc |
comparison
equal
deleted
inserted
replaced
168:9851d5c6556e | 169:15872534500d |
---|---|
1372 | 1372 |
1373 #if 0 /* FSFmacs */ | 1373 #if 0 /* FSFmacs */ |
1374 another older version of expand-file-name; | 1374 another older version of expand-file-name; |
1375 #endif | 1375 #endif |
1376 | 1376 |
1377 /* not a full declaration because realpath() is typed differently | |
1378 on different systems */ | |
1379 extern char *realpath (); | |
1380 | |
1381 DEFUN ("file-truename", Ffile_truename, 1, 2, 0, /* | 1377 DEFUN ("file-truename", Ffile_truename, 1, 2, 0, /* |
1382 Return the canonical name of the given FILE. | 1378 Return the canonical name of the given FILE. |
1383 Second arg DEFAULT is directory to start with if FILE is relative | 1379 Second arg DEFAULT is directory to start with if FILE is relative |
1384 (does not start with slash); if DEFAULT is nil or missing, | 1380 (does not start with slash); if DEFAULT is nil or missing, |
1385 the current buffer's value of default-directory is used. | 1381 the current buffer's value of default-directory is used. |
2034 | 2030 |
2035 CHECK_STRING (dirname); | 2031 CHECK_STRING (dirname); |
2036 | 2032 |
2037 GCPRO1 (dirname); | 2033 GCPRO1 (dirname); |
2038 dirname = Fexpand_file_name (dirname, Qnil); | 2034 dirname = Fexpand_file_name (dirname, Qnil); |
2039 dirname = Fdirectory_file_name (dirname); | 2035 dirname = Fdirectory_file_name (dirname); |
2040 | 2036 |
2041 handler = Ffind_file_name_handler (dirname, Qdelete_directory); | 2037 handler = Ffind_file_name_handler (dirname, Qdelete_directory); |
2042 UNGCPRO; | 2038 UNGCPRO; |
2043 if (!NILP (handler)) | 2039 if (!NILP (handler)) |
2044 return (call2 (handler, Qdelete_directory, dirname)); | 2040 return (call2 (handler, Qdelete_directory, dirname)); |
4466 by the GC. We also need to protect tail. */ | 4462 by the GC. We also need to protect tail. */ |
4467 /* #### There is probably a lot of other code which has | 4463 /* #### There is probably a lot of other code which has |
4468 pointers into buffers which may get blown away by | 4464 pointers into buffers which may get blown away by |
4469 handlers. */ | 4465 handlers. */ |
4470 { | 4466 { |
4471 struct gcpro gcpro1, gcpro2; | 4467 struct gcpro ngcpro1, ngcpro2; |
4472 GCPRO2 (buf, tail); | 4468 NGCPRO2 (buf, tail); |
4473 condition_case_1 (Qt, | 4469 condition_case_1 (Qt, |
4474 auto_save_1, Qnil, | 4470 auto_save_1, Qnil, |
4475 auto_save_error, Qnil); | 4471 auto_save_error, Qnil); |
4476 UNGCPRO; | 4472 NUNGCPRO; |
4477 } | 4473 } |
4478 /* Handler killed our saved current-buffer! Pick any. */ | 4474 /* Handler killed our saved current-buffer! Pick any. */ |
4479 if (!BUFFER_LIVE_P (XBUFFER (old))) | 4475 if (!BUFFER_LIVE_P (XBUFFER (old))) |
4480 XSETBUFFER (old, current_buffer); | 4476 XSETBUFFER (old, current_buffer); |
4481 | 4477 |