From 5e6532b0918952af6faa304d8de131deaae2cdc7 Mon Sep 17 00:00:00 2001 From: vkartha Date: Tue, 15 Jan 2019 17:06:30 +0530 Subject: [PATCH] Add functionality to save to file --- plantuml-mode.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plantuml-mode.el b/plantuml-mode.el index 02f79da..0913566 100644 --- a/plantuml-mode.el +++ b/plantuml-mode.el @@ -334,6 +334,15 @@ Uses prefix (as PREFIX) to choose where to display it: (plantuml-preview-region prefix (region-beginning) (region-end)) (plantuml-preview-buffer prefix))) +(defun plantuml-save-to-file () + (interactive) + (clipboard-kill-ring-save (point-min) (point-max)) + (generate-new-buffer "untitled") + (switch-to-buffer "untitled") + (yank) + (save-buffer) +) + (defun plantuml-init-once () "Ensure initialization only happens once." (unless plantuml-kwdList