emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#61640: closed (30.0.50; Help Elisp xref recognize defclass parent cl


From: GNU bug Tracking System
Subject: bug#61640: closed (30.0.50; Help Elisp xref recognize defclass parent classes)
Date: Mon, 20 Feb 2023 01:06:01 +0000

Your message dated Mon, 20 Feb 2023 03:05:31 +0200
with message-id <717e900b-1ccf-ad08-8949-eacce0c0e606@yandex.ru>
and subject line Re: bug#61640: 30.0.50; Help Elisp xref recognize defclass 
parent classes
has caused the debbugs.gnu.org bug report #61640,
regarding 30.0.50; Help Elisp xref recognize defclass parent classes
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
61640: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61640
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 30.0.50; Help Elisp xref recognize defclass parent classes Date: Sun, 19 Feb 2023 14:08:42 -0800 User-agent: Gnus/5.13 (Gnus v5.13)
In a form such as this:

(defclass ebdb-field-id (ebdb-field-labeled ebdb-field-obfuscated 
ebdb-field-user)
  ((label-list :initform 'ebdb-id-label-list)
   ...
   ))

All the symbols in

(ebdb-field-labeled ebdb-field-obfuscated ebdb-field-user)

should be recognized by `elisp--xref-infer-namespace' as 'function.
Right now, this is treated like a function call (ie like '(function
variable variable)).

I can't promise that the attached patch is exactly the right thing, but
it ought to be pretty close.

Thanks,
Eric

Attachment: elispxrefdefclass.diff
Description: Text Data


--- End Message ---
--- Begin Message --- Subject: Re: bug#61640: 30.0.50; Help Elisp xref recognize defclass parent classes Date: Mon, 20 Feb 2023 03:05:31 +0200 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2
Version: 30.1

On 20/02/2023 01:45, Eric Abrahamsen wrote:
Shouldn't this instead be an addition to `elisp-mode-infer-namespace',
like with p8 below?

   (elisp-mode-test--with-buffer
       (concat "(list {p1}alpha {p2}beta)\n"
               "(progn {p3}gamma {p4}delta)\n"
               "(lambda ({p5}epsilon {p6}zeta) {p7}eta)\n"
               "(defclass child-class (parent-1 {p8}parent-2)\n")
     (should (equal (elisp--xref-infer-namespace p1) 'variable))
     (should (equal (elisp--xref-infer-namespace p2) 'variable))
     (should (equal (elisp--xref-infer-namespace p3) 'variable))
     (should (equal (elisp--xref-infer-namespace p4) 'variable))
     (should (equal (elisp--xref-infer-namespace p5) 'variable))
     (should (equal (elisp--xref-infer-namespace p6) 'variable))
     (should (equal (elisp--xref-infer-namespace p7) 'variable))
     (should (equal (elisp--xref-infer-namespace p8) 'function)))

Obviously just guessing here...

It seems you're right, thanks.

I've put the test case separately and pushed the combined change to master, commit cac13e36054.

That fixes the bug in my testing, but please do tell if something else comes up.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]