forked from mirrors/org-mode
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.
This commit is contained in:
parent
b47a7d5125
commit
d56ad98544
|
@ -327,7 +327,7 @@ Works on both Emacs and XEmacs."
|
||||||
(apply 'propertize string properties)))
|
(apply 'propertize string properties)))
|
||||||
|
|
||||||
(defmacro org-find-library-dir (library)
|
(defmacro org-find-library-dir (library)
|
||||||
`(file-name-directory (locate-library ,library)))
|
`(file-name-directory (or (locate-library ,library) "")))
|
||||||
|
|
||||||
(defun org-count-lines (s)
|
(defun org-count-lines (s)
|
||||||
"How many lines in string S?"
|
"How many lines in string S?"
|
||||||
|
|
Loading…
Reference in a new issue