comparison lisp/emacs-lisp/edebug.el @ 78637:b917d8c56cca

(edebug-list-form, edebug-match-symbol, \,) (\,@): Backslash the , and ,@ which are not new-style unquotes.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 23 Aug 2007 18:38:33 +0000
parents 935157c0b596
children 808dc3e8a755 92ccd83174e6
comparison
equal deleted inserted replaced
78636:b1e667d914ef 78637:b917d8c56cca
1505 (t 1505 (t
1506 (cons head (edebug-list-form-args 1506 (cons head (edebug-list-form-args
1507 head (edebug-move-cursor cursor)))))) 1507 head (edebug-move-cursor cursor))))))
1508 1508
1509 ((consp head) 1509 ((consp head)
1510 (if (eq (car head) ',) 1510 (if (eq (car head) '\,)
1511 ;; The head of a form should normally be a symbol or a lambda 1511 ;; The head of a form should normally be a symbol or a lambda
1512 ;; expression but it can also be an unquote form to be filled 1512 ;; expression but it can also be an unquote form to be filled
1513 ;; before evaluation. We evaluate the arguments anyway, on the 1513 ;; before evaluation. We evaluate the arguments anyway, on the
1514 ;; assumption that the unquote form will place a proper function 1514 ;; assumption that the unquote form will place a proper function
1515 ;; name (rather than a macro name). 1515 ;; name (rather than a macro name).
1662 (edebug-match-nil cursor)) 1662 (edebug-match-nil cursor))
1663 1663
1664 ((fboundp symbol) ; is it a predicate? 1664 ((fboundp symbol) ; is it a predicate?
1665 (let ((sexp (edebug-top-element-required cursor "Expected" symbol))) 1665 (let ((sexp (edebug-top-element-required cursor "Expected" symbol)))
1666 ;; Special case for edebug-`. 1666 ;; Special case for edebug-`.
1667 (if (and (listp sexp) (eq (car sexp) ',)) 1667 (if (and (listp sexp) (eq (car sexp) '\,))
1668 (edebug-match cursor '(("," def-form))) 1668 (edebug-match cursor '(("," def-form)))
1669 (if (not (funcall symbol sexp)) 1669 (if (not (funcall symbol sexp))
1670 (edebug-no-match cursor symbol "failed")) 1670 (edebug-no-match cursor symbol "failed"))
1671 (edebug-move-cursor cursor) 1671 (edebug-move-cursor cursor)
1672 (list sexp)))) 1672 (list sexp))))
2100 2100
2101 (defalias 'edebug-\` '\`) ;; same macro as regular backquote. 2101 (defalias 'edebug-\` '\`) ;; same macro as regular backquote.
2102 (def-edebug-spec edebug-\` (def-form)) 2102 (def-edebug-spec edebug-\` (def-form))
2103 2103
2104 ;; Assume immediate quote in unquotes mean backquote at next higher level. 2104 ;; Assume immediate quote in unquotes mean backquote at next higher level.
2105 (def-edebug-spec , (&or ("quote" edebug-\`) def-form)) 2105 (def-edebug-spec \, (&or ("quote" edebug-\`) def-form))
2106 (def-edebug-spec ,@ (&define ;; so (,@ form) is never wrapped. 2106 (def-edebug-spec \,@ (&define ;; so (,@ form) is never wrapped.
2107 &or ("quote" edebug-\`) def-form)) 2107 &or ("quote" edebug-\`) def-form))
2108 2108
2109 ;; New byte compiler. 2109 ;; New byte compiler.
2110 (def-edebug-spec defsubst defun) 2110 (def-edebug-spec defsubst defun)
2111 (def-edebug-spec dont-compile t) 2111 (def-edebug-spec dont-compile t)