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: Sun, 13 Mar 2022 13:12:12 -0700 [thread overview]
Message-ID: <87mtht4noj.fsf@neverwas.me> (raw)
In-Reply-To: <87k0cyuemt.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 13 Mar 2022 15:10:50 +0100")
Lars Ingebrigtsen <larsi@gnus.org> writes:
> So I've now added that in Emacs 29, too.
Looks like the "def" part is missing from "defgeneric":
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el
index 777334a7a7..208d68d1ab 100644
--- a/lisp/emacs-lisp/find-func.el
+++ b/lisp/emacs-lisp/find-func.el
@@ -61,7 +61,7 @@ find-function-regexp
[...]
-cl-\\(?:defun\\|defmethod\\)\\|\
+cl-\\(?:defun\\|defmethod\\|generic\\)\\|\
~~~~~~~
I'd used both in back-to-back examples (both def- and plain generic),
which was clearly a typo landmine (sorry).
> so perhaps longer term it would be nice if it was rewritten. And
> perhaps the logic should be "first look for these things, and if we
> don't find them, then look for these other things". That is, a
> priority thing.)
I was thinking much the same, albeit in a less evolved manner. The
alternate function form for the CDRs of `find-function-regexp-alist'
members may prove useful to do the prioritizing. Perhaps it'd even be
worthwhile to incorporate more refined strategies, when available, such
as the finders provided by cl-generic.el[1].
>> 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
>
> I think that makes sense? But I haven't tested the patch.
I'm testing it indirectly (in yet another bug) but will add a unit test
for good measure and ping you in the other thread. Thanks.
[1] https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/emacs-lisp/cl-generic.el?id=dd91aac5#n995
next prev parent reply other threads:[~2022-03-13 20:12 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.
2022-03-13 14:10 ` Lars Ingebrigtsen
2022-03-13 20:12 ` J.P. [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mtht4noj.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.