comparison src/buffer.c @ 363:972bbb6d6ca2 r21-1-11

Import from CVS: tag r21-1-11
author cvs
date Mon, 13 Aug 2007 10:59:28 +0200
parents 8e84bee8ddd0
children cc15677e0335
comparison
equal deleted inserted replaced
362:1e474c183006 363:972bbb6d6ca2
431 FILENAME will be converted to its truename and used for searching, but 431 FILENAME will be converted to its truename and used for searching, but
432 the search will still be done on `buffer-file-name'. 432 the search will still be done on `buffer-file-name'.
433 */ 433 */
434 (filename)) 434 (filename))
435 { 435 {
436 /* This function can GC. GC checked 1997.04.06. */ 436 /* This function can GC. GC checked and fixed 7-11-2000 ben. */
437 REGISTER Lisp_Object tail, buf, tem; 437 REGISTER Lisp_Object tail, buf, tem;
438 struct gcpro gcpro1; 438 struct gcpro gcpro1;
439 439
440 #ifdef I18N3 440 #ifdef I18N3
441 /* DO NOT translate the filename. */ 441 /* DO NOT translate the filename. */
466 if (NILP (fn)) 466 if (NILP (fn))
467 { 467 {
468 dn = Ffile_name_directory (filename); 468 dn = Ffile_name_directory (filename);
469 fn = Ffile_truename (dn, Qnil); 469 fn = Ffile_truename (dn, Qnil);
470 if (! NILP (fn)) dn = fn; 470 if (! NILP (fn)) dn = fn;
471 fn = Fexpand_file_name (Ffile_name_nondirectory (filename), 471 /* Formerly the two calls below were combined, but that is
472 dn); 472 not GC-safe because the first call returns unprotected
473 data and the second call can GC. --ben */
474 fn = Ffile_name_nondirectory (filename);
475 fn = Fexpand_file_name (fn, dn);
473 } 476 }
474 filename = fn; 477 filename = fn;
475 NUNGCPRO; 478 NUNGCPRO;
476 } 479 }
477 480
524 } 527 }
525 528
526 Lisp_Object 529 Lisp_Object
527 get_truename_buffer (REGISTER Lisp_Object filename) 530 get_truename_buffer (REGISTER Lisp_Object filename)
528 { 531 {
532 /* This function can GC. GC correct 7-11-00 ben */
529 /* FSFmacs has its own code here and doesn't call get-file-buffer. 533 /* FSFmacs has its own code here and doesn't call get-file-buffer.
530 That's because their equivalent of find-file-compare-truenames 534 That's because their equivalent of find-file-compare-truenames
531 (find-file-existing-other-name) isn't looked at in get-file-buffer. 535 (find-file-existing-other-name) isn't looked at in get-file-buffer.
532 This way is more correct. */ 536 This way is more correct. */
533 int count = specpdl_depth (); 537 int count = specpdl_depth ();