[Emacs] Add linux support for puml-mode

This commit is contained in:
Ivan Malison 2016-09-20 01:44:50 -07:00
parent a34afd17e8
commit 60a96fdc82
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8

View File

@ -2949,7 +2949,7 @@ This mode seems to be better maintained than plantuml-mode
:mode ("\\.puml\\'" "\\.plantuml\\'") :mode ("\\.puml\\'" "\\.plantuml\\'")
:preface :preface
(progn (progn
(if (equal system-type 'darwin) (cond ((equal system-type 'darwin)
(let* ((plantuml-dir (let* ((plantuml-dir
(s-trim (shell-command-to-string "brew --prefix plantuml"))) (s-trim (shell-command-to-string "brew --prefix plantuml")))
(filename (filename
@ -2957,6 +2957,10 @@ This mode seems to be better maintained than plantuml-mode
(filepath (imalison:join-paths plantuml-dir filename))) (filepath (imalison:join-paths plantuml-dir filename)))
(setq puml-plantuml-jar-path filepath (setq puml-plantuml-jar-path filepath
org-plantuml-jar-path filepath))) org-plantuml-jar-path filepath)))
((equal system-type 'gnu/linux)
(let ((filepath "/opt/plantuml/plantuml.jar"))
(setq puml-plantuml-jar-path filepath
org-plantuml-jar-path filepath))))
(add-to-list (add-to-list
'org-src-lang-modes '("plantuml" . puml)))) 'org-src-lang-modes '("plantuml" . puml))))
#+END_SRC #+END_SRC