From 7d09b36773f18b2b060976c87605e15aa3fd8027 Mon Sep 17 00:00:00 2001 From: Carlo Sciolla Date: Thu, 16 Aug 2018 12:02:30 +0200 Subject: [PATCH] Remove all compilation warnings --- plantuml-mode.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plantuml-mode.el b/plantuml-mode.el index edc94f6..00164a2 100644 --- a/plantuml-mode.el +++ b/plantuml-mode.el @@ -398,11 +398,14 @@ Uses prefix (as PREFIX) to choose where to display it: (defun plantuml-current-block-depth () "Trace the current block indentation level by recursively looking back line by line." + ;; forward declare the lazy initialized constants + (defvar plantuml-indent-regexp-start) + (defvar plantuml-indent-regexp-end) (save-excursion - (let ((relative-depth 0)) + (let ((relative-depth 0) + (bob-visited? nil)) (beginning-of-line) (forward-line -1) - (setq bob-visited? nil) (while (and (>= relative-depth 0) (not bob-visited?)) (if (bobp) @@ -420,6 +423,9 @@ Uses prefix (as PREFIX) to choose where to display it: (defun plantuml-indent-line () "Indent the current line to its desired indentation level." (interactive) + ;; forward declare the lazy initialized constants + (defvar plantuml-indent-regexp-start) + (defvar plantuml-indent-regexp-end) (let ((original-indentation (current-indentation))) (save-excursion (beginning-of-line)