add verbosity parameter

This commit is contained in:
Andrea Corallo 2019-09-08 21:42:37 +02:00
parent b32900474f
commit 5f1039630d

View file

@ -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."