Function: ert--make-message-advice

ert--make-message-advice is a byte-compiled function defined in ert-x.el.gz.

Signature

(ert--make-message-advice COLLECTOR)

Documentation

Create around advice for message for ert-collect-messages.

COLLECTOR will be called with the message before it is passed to the real message.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/ert-x.el.gz
(defun ert--make-message-advice (collector)
  "Create around advice for `message' for `ert-collect-messages'.
COLLECTOR will be called with the message before it is passed
to the real `message'."
  (lambda (func &rest args)
    (if (or (null args) (member (car args) '("" nil)))
        (apply func args)
      (let ((msg (apply #'format-message args)))
        (funcall collector (concat msg "\n"))
        (funcall func "%s" msg)))))