unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "J.P." <jp@neverwas.me>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Lin Jian <jlin.dev@outlook.com>, 54343@debbugs.gnu.org
Subject: bug#54343: 28.0.91; find-function goes to a wrong place for erc
Date: Sat, 12 Mar 2022 19:09:30 -0800	[thread overview]
Message-ID: <87bkya8s5x.fsf@neverwas.me> (raw)
In-Reply-To: <87tuc2vfa6.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 13 Mar 2022 01:59:13 +0100")

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Hm...  it would be nice if it hit the defgeneric instead.  But you can
> have a defmethod without a defgeneric...

Right. To my surprise, it seems there are over 300 such instances of the
"without" variant in the Emacs tree.

So, currently, we have

| defgeneric | defmethod | Old | New | Example                  |
|------------+-----------+-----+-----+--------------------------|
| yes        | no        | g   | g   | xref-backend-definitions |
| no         | yes       | m   | m   | delete-instance          |
| yes        | yes       | g   | m   | xref-location-marker     |

Whereas you're saying we should want

| yes        | yes       | g   | g   | xref-location-marker     |

I think simply adding "generic" to this union

  (: "cl-def" (| "un" "method" "generic"))

may do the trick. IOW

  -cl-\\(?:defun\\|defmethod\\)\\|\
  +cl-\\(?:defun\\|defgeneric\\|defmethod\\)\\|\

appears to work in cursory testing.

>> P.S. OK to install #53617 duplicate checks in erc--switch-to-buffer?
>
> Skimming that bug report, it's not clear to me what the issue was there?

Just a benign optimization involving some culling of redundant code in
`erc--switch-to-buffer'. This email contains the latest version, with a
slightly revised commit message:

  https://lists.gnu.org/archive/html/bug-gnu-emacs/2022-01/msg02081.html

Thanks.





  reply	other threads:[~2022-03-13  3:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-11 19:57 bug#54343: 28.0.91; find-function goes to a wrong place for erc Lin Jian
2022-03-12  0:16 ` J.P.
2022-03-12  1:48   ` Michael Heerdegen
2022-03-12  3:59     ` F. Jason Park
2022-03-12  8:27   ` J.P.
2022-03-12 17:54 ` Lars Ingebrigtsen
2022-03-13  0:53   ` J.P.
2022-03-13  0:59     ` Lars Ingebrigtsen
2022-03-13  3:09       ` J.P. [this message]
2022-03-13 14:10         ` Lars Ingebrigtsen
2022-03-13 20:12           ` J.P.
2022-03-13 20:16             ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bkya8s5x.fsf@neverwas.me \
    --to=jp@neverwas.me \
    --cc=54343@debbugs.gnu.org \
    --cc=jlin.dev@outlook.com \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).