Mercurial > hg > xemacs-beta
diff 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 |
line wrap: on
line diff
--- a/src/buffer.c Mon Aug 13 10:58:41 2007 +0200 +++ b/src/buffer.c Mon Aug 13 10:59:28 2007 +0200 @@ -433,7 +433,7 @@ */ (filename)) { - /* This function can GC. GC checked 1997.04.06. */ + /* This function can GC. GC checked and fixed 7-11-2000 ben. */ REGISTER Lisp_Object tail, buf, tem; struct gcpro gcpro1; @@ -468,8 +468,11 @@ dn = Ffile_name_directory (filename); fn = Ffile_truename (dn, Qnil); if (! NILP (fn)) dn = fn; - fn = Fexpand_file_name (Ffile_name_nondirectory (filename), - dn); + /* Formerly the two calls below were combined, but that is + not GC-safe because the first call returns unprotected + data and the second call can GC. --ben */ + fn = Ffile_name_nondirectory (filename); + fn = Fexpand_file_name (fn, dn); } filename = fn; NUNGCPRO; @@ -526,6 +529,7 @@ Lisp_Object get_truename_buffer (REGISTER Lisp_Object filename) { + /* This function can GC. GC correct 7-11-00 ben */ /* FSFmacs has its own code here and doesn't call get-file-buffer. That's because their equivalent of find-file-compare-truenames (find-file-existing-other-name) isn't looked at in get-file-buffer.