* lisp/progmodes/elisp-mode.el (elisp--xref-infer-namespace):
Handle defclass parents (bug#61640).
* test/lisp/progmodes/elisp-mode-tests.el (elisp-mode-infer-namespace):
New case in the test.
cl-defmethod cl-defgeneric)))
;; (defun FUNC (... IDENT
'variable)
+ ((and (eql j 2)
+ (eq j-head 'defclass))
+ ;; (defclass CLASS (... IDENT
+ 'function)
((eq j-head 'cond)
;; (cond ... (... IDENT
'variable)
(should (equal (elisp--xref-infer-namespace p5) 'variable))
(should (equal (elisp--xref-infer-namespace p6) 'function)))
+ (elisp-mode-test--with-buffer
+ (concat "(defclass child-class ({p1}parent-1 {p2}parent-2))\n")
+ (should (equal (elisp--xref-infer-namespace p1) 'function))
+ (should (equal (elisp--xref-infer-namespace p2) 'function)))
+
(elisp-mode-test--with-buffer
(concat "(require '{p1}alpha)\n"
"(fboundp '{p2}beta)\n"