From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
To: Emacs Devel <emacs-devel@gnu.org>
Subject: Need help with defmacro
Date: Thu, 31 Jan 2008 00:58:41 +0100 [thread overview]
Message-ID: <47A10F31.9040805@gmail.com> (raw)
When I try to do instrument my-test-err4 below for edebug with
C-u C-M-x
I get an error saying
edebug-syntax-error: Invalid read syntax: "Expected", (&rest
&or (symbolp &optional form) symbolp)
Can someone please explain to me what I have done wrong here?
(defvar mumamo-use-condition-case nil)
(make-variable-buffer-local 'mumamo-use-condition-case)
(put 'mumamo-use-condition-case 'permanent-local t)
(defvar mumamo-debugger 'mumamo-debug-to-backtrace)
(make-variable-buffer-local 'mumamo-debugger)
(put 'mumamo-debugger 'permanent-local t)
(defmacro mumamo-condition-case (var body-form &rest handlers)
"Like `condition-case', but optional.
If `mumamo-use-condition-case' is nil then just evaluate
BODY. Otherwise do the same thing as
(condition-case VAR
BODY
HANDLERS)."
(declare (indent 2) (debug let))
`(if (not mumamo-use-condition-case)
(let* ((debugger mumamo-debugger)
(debug-on-error (if debugger t debug-on-error)))
,body-form)
(condition-case ,var
,body-form
,@handlers)))
(defun my-test-err4 ()
(interactive)
(mumamo-condition-case err
(my-errx)
(arith-error (message "here"))
(error (message "%s, %s" err (error-message-string err)))
))
next reply other threads:[~2008-01-30 23:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-30 23:58 Lennart Borgman (gmail) [this message]
2008-01-31 4:01 ` Need help with defmacro Stefan Monnier
2008-01-31 22:13 ` Lennart Borgman (gmail)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47A10F31.9040805@gmail.com \
--to=lennart.borgman@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.