aboutsummaryrefslogtreecommitdiffstats
path: root/src/lread.c
diff options
context:
space:
mode:
authorRichard M. Stallman1996-10-31 17:58:01 +0000
committerRichard M. Stallman1996-10-31 17:58:01 +0000
commit85496b8cb5559522c19a4541d6096c58b38559b9 (patch)
treec46c067d0f4088acb3150ecf524c9611442be3fc /src/lread.c
parent76d5c6cf01977e7ebae4d19afe7ca64786ab566c (diff)
downloademacs-85496b8cb5559522c19a4541d6096c58b38559b9.tar.gz
emacs-85496b8cb5559522c19a4541d6096c58b38559b9.zip
(dir_warning): New function.
(init_lread): Use dir_warning.
Diffstat (limited to 'src/lread.c')
-rw-r--r--src/lread.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/lread.c b/src/lread.c
index b74f1554883..647735c8555 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -2435,9 +2435,8 @@ init_lread ()
2435 { 2435 {
2436 dirfile = Fdirectory_file_name (dirfile); 2436 dirfile = Fdirectory_file_name (dirfile);
2437 if (access (XSTRING (dirfile)->data, 0) < 0) 2437 if (access (XSTRING (dirfile)->data, 0) < 0)
2438 fprintf (stderr, 2438 dir_warning ("Warning: Lisp directory `%s' does not exist.\n",
2439 "Warning: Lisp directory `%s' does not exist.\n", 2439 XCONS (path_tail)->car);
2440 XSTRING (Fcar (path_tail))->data);
2441 } 2440 }
2442 } 2441 }
2443 } 2442 }
@@ -2459,6 +2458,21 @@ init_lread ()
2459 load_descriptor_list = Qnil; 2458 load_descriptor_list = Qnil;
2460} 2459}
2461 2460
2461/* Print a warning, using format string FORMAT, that directory DIRNAME
2462 does not exist. Print it on stderr and put it in *Message*. */
2463
2464dir_warning (format, dirname)
2465 char *format;
2466 Lisp_Object dirname;
2467{
2468 char *buffer
2469 = (char *) alloca (XSTRING (dirname)->size + strlen (format) + 5);
2470
2471 fprintf (stderr, format, XSTRING (dirname)->data);
2472 sprintf (buffer, format, XSTRING (dirname)->data);
2473 message_dolog (buffer, strlen (buffer), 0);
2474}
2475
2462void 2476void
2463syms_of_lread () 2477syms_of_lread ()
2464{ 2478{