summaryrefslogtreecommitdiff
path: root/src/charset.c
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2008-09-12 03:11:38 +0000
committerGlenn Morris <rgm@gnu.org>2008-09-12 03:11:38 +0000
commitc8f94403424bc811ab2f7b8998648f936794476d (patch)
treeb68b9af708994c48c1251aec850a476f057131b5 /src/charset.c
parent835963480419fcb737b6eb0f7ed0bda1f317159e (diff)
downloademacs-c8f94403424bc811ab2f7b8998648f936794476d.tar.gz
(init_charset): Warn if etc/charsets not found. (Bug#909)
Diffstat (limited to 'src/charset.c')
-rw-r--r--src/charset.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/charset.c b/src/charset.c
index 217f51b15fb..43155d2cc65 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -1,6 +1,6 @@
/* Basic character set support.
- Copyright (C) 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+ 2008 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007, 2008
National Institute of Advanced Industrial Science and Technology (AIST)
@@ -2044,9 +2044,18 @@ Return charset identification number of CHARSET. */)
void
init_charset ()
{
- Vcharset_map_path
- = Fcons (Fexpand_file_name (build_string ("charsets"), Vdata_directory),
- Qnil);
+ Lisp_Object tempdir;
+ tempdir = Fexpand_file_name (build_string ("charsets"), Vdata_directory);
+ if (access (SDATA (tempdir), 0) < 0)
+ {
+ dir_warning ("Error: charsets directory (%s) does not exist.\n\
+Emacs will not function correctly without the character map files.\n\
+Please check your installation!\n",
+ tempdir);
+ /* TODO should this be a fatal error? (Bug#909) */
+ }
+
+ Vcharset_map_path = Fcons (tempdir, Qnil);
}