merged develop

This commit is contained in:
Carlo Sciolla 2016-11-11 09:17:16 +01:00
commit 76a96af6e8
No known key found for this signature in database
GPG Key ID: BA5D71E6F3C580C1
1 changed files with 14 additions and 2 deletions

View File

@ -83,7 +83,7 @@
(defun plantuml-render-command (&rest arguments)
"Create a command line to execute PlantUML with arguments (as ARGUMENTS)."
(let* ((cmd-list (append plantuml-java-args (list plantuml-jar-path) arguments))
(let* ((cmd-list (append plantuml-java-args (list (expand-file-name plantuml-jar-path)) arguments))
(cmd (mapconcat 'identity cmd-list "|")))
(plantuml-debug (format "Command is [%s]" cmd))
cmd-list))
@ -219,7 +219,7 @@ default output type for new buffers."
`(start-process "PLANTUML" ,buf
plantuml-java-command
,@plantuml-java-args
(shell-quote-argument plantuml-jar-path)
(shell-quote-argument (expand-file-name plantuml-jar-path))
(plantuml-output-type-opt) "-p"))
(defun plantuml-preview-string (prefix string)
@ -277,6 +277,18 @@ Uses prefix (as PREFIX) to choose where to display it:
(region-beginning) (region-end))
"\n@enduml")))
(defun plantuml-preview-current-block (prefix)
"Preview diagram from the PlantUML sources from the previous @startuml to the next @enduml.
Uses prefix (as PREFIX) to choose where to display it:
- 4 (when prefixing the command with C-u) -> new window
- 16 (when prefixing the command with C-u C-u) -> new frame.
- else -> new buffer"
(interactive "p")
(save-restriction
(narrow-to-region
(search-backward "@startuml") (search-forward "@enduml"))
(plantuml-preview-buffer prefix)))
(defun plantuml-preview (prefix)
"Preview diagram from the PlantUML sources.
Uses the current region if one is active, or the entire buffer otherwise.