Function: testcover-start

testcover-start is an autoloaded, interactive and byte-compiled function defined in testcover.el.gz.

Signature

(testcover-start FILENAME &optional BYTE-COMPILE)

Documentation

Use Edebug to instrument for coverage all macros and functions in FILENAME.

If BYTE-COMPILE is non-nil, byte compile each function after instrumenting.

Probably introduced at or before Emacs version 22.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/testcover.el.gz
;;;=========================================================================
;;; Add instrumentation to your module
;;;=========================================================================

;;;###autoload
(defun testcover-start (filename &optional byte-compile)
  "Use Edebug to instrument for coverage all macros and functions in FILENAME.
If BYTE-COMPILE is non-nil, byte compile each function after instrumenting."
  (interactive "fStart covering file: ")
  (let ((buf (find-file filename)))
    (setq edebug-form-data nil
          testcover-module-constants nil
          testcover-module-1value-functions nil
          testcover-module-potentially-1value-functions nil)
    (let ((edebug-all-defs t)
          (edebug-after-instrumentation-function #'testcover-after-instrumentation)
          (edebug-new-definition-function #'testcover-init-definition))
      (eval-buffer buf)))
  (when byte-compile
    (dolist (x (reverse edebug-form-data))
      (when (fboundp (car x))
	(message "Compiling %s..." (car x))
	(byte-compile (car x))))))