From fc9db3174a863eb480d1558320d70da7646867bd Mon Sep 17 00:00:00 2001 From: Joost Diepenmaat Date: Tue, 24 Sep 2019 12:56:29 +0200 Subject: [PATCH] Allow easier customization of indentation level --- plantuml-mode.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plantuml-mode.el b/plantuml-mode.el index f1271d1..eb11d3d 100644 --- a/plantuml-mode.el +++ b/plantuml-mode.el @@ -143,6 +143,9 @@ :type 'boolean :group 'plantuml) +(defcustom plantuml-indent-level 8 + "Indentation level of PlantUML lines") + (defun plantuml-jar-render-command (&rest arguments) "Create a command line to execute PlantUML with arguments (as ARGUMENTS)." (let* ((cmd-list (append plantuml-java-args (list (expand-file-name plantuml-jar-path)) plantuml-jar-args arguments)) @@ -708,7 +711,7 @@ Restore point to same position in text of the line as before indentation." (let ((original-position-eol (- (line-end-position) (point)))) (save-excursion (beginning-of-line) - (indent-line-to (* tab-width (plantuml-current-block-depth)))) + (indent-line-to (* plantuml-indent-level (plantuml-current-block-depth)))) ;; restore position in text of line (goto-char (- (line-end-position) original-position-eol))))