summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAchim Gratz <Stromeko@Stromeko.DE>2012-10-07 13:01:39 (GMT)
committer Achim Gratz <Stromeko@Stromeko.DE>2012-10-07 16:11:33 (GMT)
commitd56ad98544e489e25738b3dc45b0060412002eed (patch)
tree999ea71607acac06c1162e4a3df6558f3b9f47dd
parentb47a7d51257688704884245972331fe7a9727cc5 (diff)
downloadorg-mode-d56ad98544e489e25738b3dc45b0060412002eed.zip
org-mode-d56ad98544e489e25738b3dc45b0060412002eed.tar.gz
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.
-rw-r--r--lisp/org-compat.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/org-compat.el b/lisp/org-compat.el
index 7604284..6e582b8 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?"