소스 검색

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.
Achim Gratz 12 년 전
부모
커밋
d56ad98544
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      lisp/org-compat.el

+ 1 - 1
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?"