Function: debug-early

debug-early is a byte-compiled function defined in debug-early.el.gz.

Signature

(debug-early &rest ARGS)

Documentation

Print an error message with a backtrace of active Lisp function calls.

The output stream used is the value of standard-output.

The Emacs core calls this function after an error has been signaled, and supplies two ARGS. These are the symbol error (which is ignored) and a cons of the error symbol and the error data.

debug-early is a simplified version of debug, and is available during the early parts of the build process. It is superseded by debug after enough Lisp has been loaded to support the latter, except in batch mode which always uses debug-early.

(In versions of Emacs prior to Emacs 29, no backtrace was
available before debug was usable.)

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/debug-early.el.gz
(defalias 'debug-early
  #'(lambda (&rest args)
  "Print an error message with a backtrace of active Lisp function calls.
The output stream used is the value of `standard-output'.

The Emacs core calls this function after an error has been
signaled, and supplies two ARGS.  These are the symbol
`error' (which is ignored) and a cons of the error symbol and the
error data.

`debug-early' is a simplified version of `debug', and is
available during the early parts of the build process.  It is
superseded by `debug' after enough Lisp has been loaded to
support the latter, except in batch mode which always uses
`debug-early'.

\(In versions of Emacs prior to Emacs 29, no backtrace was
available before `debug' was usable.)"
  (princ "\nError: ")
  (prin1 (car (car (cdr args))))	; The error symbol.
  (princ " ")
  (prin1 (cdr (car (cdr args))))	; The error data.
  (debug-early-backtrace)))