Merge done, new version signalled
This commit is contained in:
parent
2842aad15a
commit
664bc47000
14
puml-mode.el
14
puml-mode.el
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
;;; Change log:
|
;;; Change log:
|
||||||
;;
|
;;
|
||||||
|
;; version 0.6.3, 2015-11-07 Added per-buffer configurability of output type (thanks to https://github.com/davazp)
|
||||||
;; version 0.6.2, 2015-11-07 Added debugging capabilities to improve issue analysis
|
;; version 0.6.2, 2015-11-07 Added debugging capabilities to improve issue analysis
|
||||||
;; version 0.6.1, 2015-09-26 Bugfix: use eq to compare symbols instead of cl-equalp
|
;; version 0.6.1, 2015-09-26 Bugfix: use eq to compare symbols instead of cl-equalp
|
||||||
;; version 0.6, 2015-09-26 Fixed PNG preview
|
;; version 0.6, 2015-09-26 Fixed PNG preview
|
||||||
|
@ -171,12 +172,12 @@
|
||||||
|
|
||||||
(defun puml-set-output-type (type)
|
(defun puml-set-output-type (type)
|
||||||
"Set the desired output type (as TYPE) for the current buffer.
|
"Set the desired output type (as TYPE) for the current buffer.
|
||||||
If the major mode of the current buffer mode is not puml-mode, set the
|
If the
|
||||||
|
major mode of the current buffer mode is not puml-mode, set the
|
||||||
default output type for new buffers."
|
default output type for new buffers."
|
||||||
(interactive (list (puml-read-output-type)))
|
(interactive (list (puml-read-output-type)))
|
||||||
(setq puml-output-type type))
|
(setq puml-output-type type))
|
||||||
|
|
||||||
|
|
||||||
(defun puml-is-image-output-p ()
|
(defun puml-is-image-output-p ()
|
||||||
"Return true if the diagram output format is an image, false if it's text based."
|
"Return true if the diagram output format is an image, false if it's text based."
|
||||||
(not (equal "utxt" puml-output-type)))
|
(not (equal "utxt" puml-output-type)))
|
||||||
|
@ -191,17 +192,16 @@ default output type for new buffers."
|
||||||
(let ((b (get-buffer puml-preview-buffer)))
|
(let ((b (get-buffer puml-preview-buffer)))
|
||||||
(when b
|
(when b
|
||||||
(kill-buffer b)))
|
(kill-buffer b)))
|
||||||
|
|
||||||
(let* ((imagep (and (display-images-p)
|
(let* ((imagep (and (display-images-p)
|
||||||
(puml-is-image-output-p)))
|
(puml-is-image-output-p)))
|
||||||
(process-connection-type nil)
|
(process-connection-type nil)
|
||||||
(buf (get-buffer-create puml-preview-buffer))
|
(buf (get-buffer-create puml-preview-buffer))
|
||||||
(coding-system-for-read (and imagep 'binary))
|
(coding-system-for-read (and imagep 'binary))
|
||||||
(coding-system-for-write (and imagep 'binary))
|
(coding-system-for-write (and imagep 'binary)))
|
||||||
(command-params (shell-quote-argument puml-plantuml-jar-path)))
|
|
||||||
(puml-debug "Executing:")
|
|
||||||
(puml-debug (concat "java -jar " command-params " " (puml-output-type-opt) " -p"))
|
|
||||||
(let ((ps (start-process "PUML" buf
|
(let ((ps (start-process "PUML" buf
|
||||||
"java" "-jar" command-params
|
"java" "-jar" (shell-quote-argument puml-plantuml-jar-path)
|
||||||
(puml-output-type-opt) "-p")))
|
(puml-output-type-opt) "-p")))
|
||||||
(process-send-region ps (point-min) (point-max))
|
(process-send-region ps (point-min) (point-max))
|
||||||
(process-send-eof ps)
|
(process-send-eof ps)
|
||||||
|
|
Loading…
Reference in New Issue