Mercurial > emacs
changeset 16487:8e154ff6d4bf
(dir_warning): New function.
(init_lread): Use dir_warning.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 31 Oct 1996 17:58:01 +0000 |
parents | 30b8c014eaa7 |
children | 65c729d461c3 |
files | src/lread.c |
diffstat | 1 files changed, 17 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lread.c Thu Oct 31 17:57:43 1996 +0000 +++ b/src/lread.c Thu Oct 31 17:58:01 1996 +0000 @@ -2435,9 +2435,8 @@ { dirfile = Fdirectory_file_name (dirfile); if (access (XSTRING (dirfile)->data, 0) < 0) - fprintf (stderr, - "Warning: Lisp directory `%s' does not exist.\n", - XSTRING (Fcar (path_tail))->data); + dir_warning ("Warning: Lisp directory `%s' does not exist.\n", + XCONS (path_tail)->car); } } } @@ -2459,6 +2458,21 @@ 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 syms_of_lread () {