Mercurial > emacs
changeset 16651:e7449d679e72
(Fread_file_name_internal): Verify STRING is a string.
(Fread_file_name): Don't insert DIR or INITIAL if it isn't a string.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 09 Dec 1996 06:38:01 +0000 |
parents | 092790f767a4 |
children | eb3f3934a185 |
files | src/fileio.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/fileio.c Mon Dec 09 06:37:30 1996 +0000 +++ b/src/fileio.c Mon Dec 09 06:38:01 1996 +0000 @@ -4304,6 +4304,8 @@ int changed; struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; + CHECK_STRING (string, 0); + realdir = dir; name = string; orig_string = Qnil; @@ -4409,7 +4411,7 @@ XSTRING (dir)->data[0] = '~'; } - if (insert_default_directory) + if (insert_default_directory && STRINGP (dir)) { insdef = dir; if (!NILP (initial)) @@ -4425,7 +4427,7 @@ else insdef1 = double_dollars (insdef); } - else if (!NILP (initial)) + else if (STRINGP (initial)) { insdef = initial; insdef1 = Fcons (double_dollars (insdef), 0);