From d56ad98544e489e25738b3dc45b0060412002eed Mon Sep 17 00:00:00 2001 From: Achim Gratz Date: Sun, 7 Oct 2012 15:01:39 +0200 Subject: [PATCH] fix a possible (wrong-type-argument stringp nil) error * lisp/org-compat.el: Make sure that file-name-directory is getting a stringp. This avoids a possible "(wrong-type-argument stringp nil)" error when the library in question does not exist. --- lisp/org-compat.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-compat.el b/lisp/org-compat.el index 760428496..6e582b8c1 100644 --- a/lisp/org-compat.el +++ b/lisp/org-compat.el @@ -327,7 +327,7 @@ Works on both Emacs and XEmacs." (apply 'propertize string properties))) (defmacro org-find-library-dir (library) - `(file-name-directory (locate-library ,library))) + `(file-name-directory (or (locate-library ,library) ""))) (defun org-count-lines (s) "How many lines in string S?"