diff options
| author | Eric Abrahamsen | 2023-02-20 03:01:41 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2023-02-20 03:01:41 +0200 |
| commit | cac13e360547f95ec64d34f38003dfc7ff1a97ee (patch) | |
| tree | e546fb00ec5d2dbc2cdaa7a633becad08a68444e /test | |
| parent | 9e745ed3f2c53f9ca46e763c8eac66a1cf8611c6 (diff) | |
| download | emacs-cac13e360547f95ec64d34f38003dfc7ff1a97ee.tar.gz emacs-cac13e360547f95ec64d34f38003dfc7ff1a97ee.zip | |
Help Elisp xref recognize defclass parent classes
* 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.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/progmodes/elisp-mode-tests.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/lisp/progmodes/elisp-mode-tests.el b/test/lisp/progmodes/elisp-mode-tests.el index 57b39a49801..5b6ef88dceb 100644 --- a/test/lisp/progmodes/elisp-mode-tests.el +++ b/test/lisp/progmodes/elisp-mode-tests.el | |||
| @@ -1004,6 +1004,11 @@ evaluation of BODY." | |||
| 1004 | (should (equal (elisp--xref-infer-namespace p6) 'function))) | 1004 | (should (equal (elisp--xref-infer-namespace p6) 'function))) |
| 1005 | 1005 | ||
| 1006 | (elisp-mode-test--with-buffer | 1006 | (elisp-mode-test--with-buffer |
| 1007 | (concat "(defclass child-class ({p1}parent-1 {p2}parent-2))\n") | ||
| 1008 | (should (equal (elisp--xref-infer-namespace p1) 'function)) | ||
| 1009 | (should (equal (elisp--xref-infer-namespace p2) 'function))) | ||
| 1010 | |||
| 1011 | (elisp-mode-test--with-buffer | ||
| 1007 | (concat "(require '{p1}alpha)\n" | 1012 | (concat "(require '{p1}alpha)\n" |
| 1008 | "(fboundp '{p2}beta)\n" | 1013 | "(fboundp '{p2}beta)\n" |
| 1009 | "(boundp '{p3}gamma)\n" | 1014 | "(boundp '{p3}gamma)\n" |