Function: bytecomp--displaying-warnings
bytecomp--displaying-warnings is a byte-compiled function defined in
bytecomp.el.gz.
Signature
(bytecomp--displaying-warnings BODY-FN)
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/bytecomp.el.gz
(defun bytecomp--displaying-warnings (body-fn)
(let* ((wrapped-body
(lambda ()
(if byte-compile-debug
(funcall body-fn)
;; Use a `handler-bind' to remember the `byte-compile-form-stack'
;; active at the time the error is signaled, so as to
;; get more precise error locations.
(let ((form-stack nil))
(condition-case error-info
(handler-bind
((error (lambda (_err)
(setq form-stack byte-compile-form-stack))))
(funcall body-fn))
(error (let ((byte-compile-form-stack form-stack))
(byte-compile-report-error error-info))))))))
(warning-series-started
(and (markerp warning-series)
(eq (marker-buffer warning-series)
(get-buffer byte-compile-log-buffer))))
(byte-compile-form-stack byte-compile-form-stack))
(if (or (eq warning-series #'byte-compile-warning-series)
warning-series-started)
;; warning-series does come from compilation,
;; so don't bind it, but maybe do set it.
(let ((tem (byte-compile-log-file))) ;; Log the file name.
(unless warning-series-started
(setq warning-series (or tem #'byte-compile-warning-series)))
(funcall wrapped-body))
;; warning-series does not come from compilation, so bind it.
(let ((warning-series
;; Log the file name. Record position of that text.
(or (byte-compile-log-file) #'byte-compile-warning-series)))
(funcall wrapped-body)))))