* riece-options.el (riece-data-directory): Avoid compile time
authorkaoru <kaoru>
Mon, 15 Aug 2005 13:31:33 +0000 (13:31 +0000)
committerkaoru <kaoru>
Mon, 15 Aug 2005 13:31:33 +0000 (13:31 +0000)
error when locate-data-directory undefined.

lisp/ChangeLog
lisp/riece-options.el

index cd6dccc..c2862a3 100644 (file)
@@ -1,3 +1,8 @@
+2005-08-15  TAKAHASHI Kaoru  <kaoru@kaisei.org>
+
+       * riece-options.el (riece-data-directory): Avoid compile time
+       error when locate-data-directory undefined.
+
 2005-08-15  Daiki Ueno  <ueno@unixuser.org>
 
        * riece-options.el (riece-quit-timeout): Set default to 1.
index c037b11..1e1057c 100644 (file)
@@ -87,9 +87,13 @@ See the document of the function `recenter'."
   :group 'riece-options)
 
 (defcustom riece-data-directory
-  (if (fboundp 'locate-data-directory)
-      (locate-data-directory "riece")
-    (file-name-directory (locate-library (symbol-file 'riece-data-directory))))
+  (cond ((fboundp 'locate-data-directory)
+        (locate-data-directory "riece"))
+       ((symbol-file 'riece-data-directory)
+        (file-name-directory
+         (locate-library (symbol-file 'riece-data-directory))))
+       (t
+        (expand-file-name "riece" data-directory)))
   "Where to look for data files."
   :type 'directory
   :group 'riece-options)