Commit 85496b8c authored by Richard M. Stallman's avatar Richard M. Stallman

(dir_warning): New function.

(init_lread): Use dir_warning.
parent 76d5c6cf
...@@ -2435,9 +2435,8 @@ init_lread () ...@@ -2435,9 +2435,8 @@ init_lread ()
{ {
dirfile = Fdirectory_file_name (dirfile); dirfile = Fdirectory_file_name (dirfile);
if (access (XSTRING (dirfile)->data, 0) < 0) if (access (XSTRING (dirfile)->data, 0) < 0)
fprintf (stderr, dir_warning ("Warning: Lisp directory `%s' does not exist.\n",
"Warning: Lisp directory `%s' does not exist.\n", XCONS (path_tail)->car);
XSTRING (Fcar (path_tail))->data);
} }
} }
} }
...@@ -2459,6 +2458,21 @@ init_lread () ...@@ -2459,6 +2458,21 @@ init_lread ()
load_descriptor_list = Qnil; load_descriptor_list = Qnil;
} }
/* Print a warning, using format string FORMAT, that directory DIRNAME
does not exist. Print it on stderr and put it in *Message*. */
dir_warning (format, dirname)
char *format;
Lisp_Object dirname;
{
char *buffer
= (char *) alloca (XSTRING (dirname)->size + strlen (format) + 5);
fprintf (stderr, format, XSTRING (dirname)->data);
sprintf (buffer, format, XSTRING (dirname)->data);
message_dolog (buffer, strlen (buffer), 0);
}
void void
syms_of_lread () syms_of_lread ()
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment