From 5f1039630dc8bf63f65df5c7882246f267d01295 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Sun, 8 Sep 2019 21:42:37 +0200 Subject: [PATCH] add verbosity parameter --- lisp/emacs-lisp/comp.el | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index c18e3b8dc69..0770d32f7a1 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -47,6 +47,7 @@ ;; FIXME these has to be removed (defvar comp-speed 2) +(defvar comp-verbose nil) (defvar comp-pass nil "Every pass has the right to bind what it likes here.") @@ -205,16 +206,19 @@ BODY is evaluate only if `comp-debug' is non nil." (defun comp-log (data) "Log DATA." - (if noninteractive + (if (and noninteractive + comp-verbose) (if (atom data) (message "%s" data) (mapc (lambda (x) (message "%s"(prin1-to-string x))) data)) (comp-within-log-buff - (mapc (lambda (x) - (insert (prin1-to-string x) "\n")) - data)))) + (if (and data (atom data)) + (insert data) + (mapc (lambda (x) + (insert (prin1-to-string x) "\n")) + data))))) (defun comp-log-func (func) "Log function FUNC." -- 2.39.5