help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Beginner lisp problem


From: exits funnel
Subject: Beginner lisp problem
Date: Wed, 14 Jul 2004 17:59:52 -0700 (PDT)

Hello,

I'm just starting to write my first lisp and I've got
a quick question.  I've added the following to my
.emacs:

(defun my-debug-mode-hook (ar)
 (message "In Hook")
)
(add-hook 'jde-dbs-debugger-hook 'my-debug-mode-hook)

and I see my message printed as I'd expect.  The hook
is called when the debugger starts and when it quits
and the value of the passed argument indicates which
is the case.  I'd like to have separate customizations
for each case so I modified my hook as follows:

(defun my-debug-mode-hook (ar)
  (if (ar)
    (message "Exits: Debugger Starting")
    (message "Exits: Debugger Qutting")
  )
)
(add-hook 'jde-dbs-debugger-hook 'my-debug-mode-hook)

Unfortunately, now I get the following error when the
hook is called:

Debugger entered--Lisp error: (void-function ar)
  (ar)
  (if (ar) (message "Exits: Debugger Starting")
(message "Exits: Debugger Qutting"))
  my-debug-mode-hook(t)
  run-hook-with-args(my-debug-mode-hook t)
  jde-dbs-debugger([object jde-dbs-debugger "JDEbug"
"JDEbug" "*JDEbug*" unbound unbound nil unbound nil
unbound nil unbound unbound unbound nil])
  apply(jde-dbs-debugger [object jde-dbs-debugger
"JDEbug" "JDEbug" "*JDEbug*" unbound unbound nil
unbound nil unbound nil unbound unbound unbound nil])
  (setq rval (apply (car ...) newargs))
  (let ((scoped-class ...) (eieio-generic-call-key
...)) (setq found t) (setq rval (apply ... newargs)))
  (if (car lambdas) (let (... ...) (setq found t)
(setq rval ...)))
  (while lambdas (if (car lambdas) (let ... ... ...))
(setq lambdas (cdr lambdas) keys (cdr keys)))
  (let ((rval nil) (found nil)) (while lambdas (if ...
...) (setq lambdas ... keys ...)) (if (not found) (if
... ... ...)) rval)
  (let ((newargs nil) (mclass nil) (lambdas nil)
(tlambdas nil) (keys nil) (static nil)
(eieio-generic-call-methodname method)
(eieio-generic-call-arglst args) (firstarg nil)) (setq
newargs args firstarg (car newargs)) (if (and ... ...
... ...) (load ...)) (cond (... ...) (... ...)) (if
static (progn ... ...) (setq tlambdas ...) (setq
lambdas ... keys ...) (setq tlambdas ...) (setq
lambdas ... keys ...) (setq tlambdas ...) (setq
lambdas ... keys ...)) (let (... ...) (while lambdas
... ...) (if ... ...) rval))
  eieio-generic-call(jde-dbs-debugger-start ([object
jde-dbs-debugger "JDEbug" "JDEbug" "*JDEbug*" unbound
unbound nil unbound nil unbound nil unbound unbound
unbound nil]))
  jde-dbs-debugger-start([object jde-dbs-debugger
"JDEbug" "JDEbug" "*JDEbug*" unbound unbound nil
unbound nil unbound nil unbound unbound unbound nil])
  jde-bug-debug-app()
  jde-debug()
  call-interactively(jde-debug)


I'm sure my mistake is obvious to anyone who knows
some lisp but I can't get it sorted out and would
appreciate a jumpstart.  Thanks in advance!

-exits

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]