Commits (2)
......@@ -432,9 +432,8 @@ The set of acceptable TYPEs (also called \"specializers\") is defined
(&define ; this means we are defining something
[&or name ("setf" name :name setf)]
;; ^^ This is the methods symbol
[ &rest atom ] ; Multiple qualifiers are allowed.
; Like in CLOS spec, we support
; any non-list values.
[ &rest cl-generic-method-qualifier ]
;; Multiple qualifiers are allowed.
cl-generic-method-args ; arguments
lambda-doc ; documentation string
def-body))) ; part to be debugged
......@@ -1731,6 +1731,8 @@ contains a circular object."
;; Less frequently used:
;; (function . edebug-match-function)
(lambda-expr . edebug-match-lambda-expr)
. edebug-match-cl-generic-method-qualifier)
(cl-generic-method-args . edebug-match-cl-generic-method-args)
(cl-macrolet-expr . edebug-match-cl-macrolet-expr)
(cl-macrolet-name . edebug-match-cl-macrolet-name)
......@@ -2035,6 +2037,16 @@ contains a circular object."
(defun edebug-match-cl-generic-method-qualifier (cursor)
"Match a QUALIFIER for `cl-defmethod' at CURSOR."
(let ((args (edebug-top-element-required cursor "Expected qualifier")))
;; Like in CLOS spec, we support any non-list values.
(unless (atom args) (edebug-no-match cursor "Atom expected"))
;; Append the arguments to `edebug-def-name' (Bug#42671).
(setq edebug-def-name (intern (format "%s %s" edebug-def-name args)))
(edebug-move-cursor cursor)
(list args)))
(defun edebug-match-cl-generic-method-args (cursor)
(let ((args (edebug-top-element-required cursor "Expected arguments")))
(if (not (consp args))
......@@ -4652,7 +4652,8 @@ mark_maybe_object (Lisp_Object obj)
(void) overflow;
void *po = (char *) ((intptr_t) (char *) XLP (obj) + offset);
INT_ADD_WRAPV (offset, (intptr_t) (char *) XLP (obj), &offset);
void *po = (char *) offset;
/* If the pointer is in the dump image and the dump has a record
of the object starting at the place where the pointer points, we
......@@ -938,5 +938,27 @@ test and possibly others should be updated."
(should (equal edebug-tests-@-result '(0 1))))))
(ert-deftest edebug-cl-defmethod-qualifier ()
"Check that secondary `cl-defmethod' forms don't stomp over
primary ones (Bug#42671)."
(let* ((edebug-all-defs t)
(edebug-initial-mode 'Go-nonstop)
(defined-symbols ())
(lambda (def-name)
(push def-name defined-symbols)
(edebug-new-definition def-name))))
(dolist (form '((cl-defmethod edebug-cl-defmethod-qualifier ((_ number)))
(cl-defmethod edebug-cl-defmethod-qualifier
:around ((_ number)))))
(print form (current-buffer)))
(list (intern "edebug-cl-defmethod-qualifier :around ((_ number))")
(intern "edebug-cl-defmethod-qualifier ((_ number))")))))))
(provide 'edebug-tests)
;;; edebug-tests.el ends here