[Emacs] Handle plantuml not present in macOS

This commit is contained in:
Ivan Malison 2016-10-09 23:02:10 -07:00
parent c74dec3982
commit 243223d73a
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8

View File

@ -3105,8 +3105,10 @@ This mode seems to be better maintained than plantuml-mode
(let* ((plantuml-dir
(s-trim (shell-command-to-string "brew --prefix plantuml")))
(filename
(--first (s-ends-with? ".jar" it) (directory-files plantuml-dir)))
(filepath (imalison:join-paths plantuml-dir filename)))
(when (file-exists-p plantuml-dir)
(--first (s-ends-with? ".jar" it) (directory-files plantuml-dir))))
(filepath (when filename
(imalison:join-paths plantuml-dir filename))))
(setq puml-plantuml-jar-path filepath
org-plantuml-jar-path filepath)))
((equal system-type 'gnu/linux)