From af82b3e24e8c5430b28e260d34dc196961aec6fc Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Sun, 22 Oct 2017 09:47:33 +0300 Subject: [PATCH] Fixed warning "Warning (bytecomp): reference to free variable 'log4slime-mode'". --- elisp/log4slime.el | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/elisp/log4slime.el b/elisp/log4slime.el index 466318f..b92e997 100644 --- a/elisp/log4slime.el +++ b/elisp/log4slime.el @@ -746,15 +746,6 @@ to the first log statement" (goto-char next))))))) -(eval-after-load 'slime-repl - '(defadvice slime-repl-emit (around highlight-logging-category activate compile) - (with-current-buffer (slime-output-buffer) - (if log4slime-mode - (let ((start (marker-position slime-output-end))) - (setq ad-return-value ad-do-it) - (log4slime-highlight-log-message start (marker-position slime-output-end))) - (setq ad-return-value ad-do-it))))) - (defun log4slime-make-menubar-menu () (let ((C '(log4slime-check-connection))) ;; First level is dynamic @@ -875,6 +866,17 @@ variable `log4slime-menu-levels'. (when log4slime-mode (log4slime-check-connection t))) + +(eval-after-load 'slime-repl + '(defadvice slime-repl-emit (around highlight-logging-category activate compile) + (with-current-buffer (slime-output-buffer) + (if log4slime-mode + (let ((start (marker-position slime-output-end))) + (setq ad-return-value ad-do-it) + (log4slime-highlight-log-message start (marker-position slime-output-end))) + (setq ad-return-value ad-do-it))))) + + (defun log4slime-redefine-menus (&optional global) "Redefine log4slime menus. If GLOBAL is true, make dropdown menu global instead of local to files with `log4slime-mode' active"