Subject: 24.0.50; Lisp error (void-variable DEFUN) when debugging Elisp code

From: Christoph <[email-masked]>
Date: Sat, 17 Jul 2010 17:12:06 -0600

Start Emacs with emacs -Q. Go to grep.el, l.916 in function regrep. Set
breakpoint with `C-u C-M-x'. Run `M-x rgrep'. Press `i' to step into the
function. The debugger pops up with the following backtrace:

Debugger entered--Lisp error: (void-variable DEFUN)
  apply(debug error (void-variable DEFUN))
  edebug(error (void-variable DEFUN))
  signal(void-variable (DEFUN))
  edebug-signal(void-variable (DEFUN))
  (edebug-after 0 0 DEFUN)
  (lambda nil (edebug-after 0 0 DEFUN))()
  edebug-enter(edebug-anon2 nil (lambda nil (edebug-after 0 0 DEFUN)))
  edebug-enter(edebug-anon2 nil (lambda nil (edebug-after 0 0 DEFUN)))
  eval((edebug-enter (quote edebug-anon2) nil (function (lambda nil ...))))
  eval-expression((edebug-enter (quote edebug-anon2) nil (function (lambda nil ...))))
  edebug-eval-top-level-form()
  edebug-instrument-function(progn)
  edebug-instrument-callee()
  edebug-step-in()
  call-interactively(edebug-step-in nil nil)
  recursive-edit()
  edebug-recursive-edit()
  edebug-display()
  edebug-debugger(0 before nil)
  edebug-before(0)
  (edebug-after (edebug-before 0) 40 (progn (edebug-after ... 2 ...) (edebug-after ... 39 ...)))
  (lambda nil (edebug-after (edebug-before 0) 40 (progn ... ...)))()
  edebug-enter(rgrep nil (lambda nil (edebug-after (edebug-before 0) 40 (progn ... ...))))
  edebug-enter(rgrep nil (lambda nil (edebug-after (edebug-before 0) 40 (progn ... ...))))
  call-interactively(rgrep t nil)
  execute-extended-command(nil)
  call-interactively(execute-extended-command nil nil)

In GNU Emacs 24.0.50.1 (i386-mingw-nt6.1.7600)
 of 2010-07-17 on MARVIN
Windowing system distributor `Microsoft Corp.', version 6.1.7600
configured using `configure --with-gcc (3.4) --cflags -IC:/Progra~2/GnuWin32/include -ID:/devel/emacs/libXpm-3.5.8/include -ID:/devel/emacs/libXpm-3.5.8/src'

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ENU
  value of $XMODIFIERS: nil
  locale-coding-system: cp1252
  default enable-multibyte-characters: t

Major mode: Debugger

Minor modes in effect:
  ido-everywhere: t
  yas/global-mode: t
  global-auto-revert-mode: t
  delete-selection-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t

Recent input:
C-x r l <return> C-x RET r g r e p <backspace> <backspace> 
<backspace> <backspace> <backspace> C-g <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> C-u 
C-M-x C-x RET r g g r e p <backspace> <backspace> <backspace> 
<backspace> r e p <return> i <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> C-SPC C-SPC C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n M-w C-x RET r e p o r t <tab> 
<return>

Recent messages:
Loading vc-bzr...done
Quit
ad-handle-definition: `eval-defun' got redefined
Edebug: edebug-anon0
Edebug: edebug-anon1
Edebug: rgrep
Edebug: edebug-anon2
Entering debugger...
Mark set
Mark activated

Load-path shadows:
None found.

Features:
(shadow sort gnus-cite mail-extr gnus-msg gnus-art mm-uu mml2015 pgg
pgg-parse pgg-def epg-config mm-view smime password-cache dig mailcap
gnus-sum nnoo gnus-group time-date gnus-undo nnmail mail-source
format-spec gnus-start gnus-spec gnus-int gnus-range gnus-win message
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus gnus-ems
nnheader gnus-util mail-utils mm-util mail-prsvr multi-isearch emacsbug
help-mode view debug find-func cl-specs edebug vc-bzr sha1 hex-util
server package re-builder ack-emacs ibuffer nav nav-tags python-21
python nav-bufs xcscope anything-config warnings semantic/util-modes
semantic/util semantic semantic/tag semantic/lex semantic/fw loaddefs
eieio byte-opt bytecomp byte-compile mode-local cedet imenu bookmark pp
ffap dired rx thingatpt anything woman man cc-mode cc-fonts cc-menus
cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs grep-o-matic grep
compile comint browse-kill-ring+ browse-kill-ring second-sel ido
yasnippet dropdown-list derived easy-mmode assoc etags-table etags ring
remember zenburn color-theme edmacro kmacro wid-edit cl cl-19 sendmail
regexp-opt reporter easymenu uniquify advice help-fns advice-preload
autorevert delsel tooltip ediff-hook vc-hooks lisp-float-type mwheel
dos-w32 disp-table ls-lisp w32-win w32-vars tool-bar dnd fontset image
fringe lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev button minibuffer faces cus-face files text-properties
overlay md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process multi-tty emacs)