From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [elpa] externals/transient 459e28e28a 03/11: Add lisp-imenu-generic-expression entry Date: Sun, 26 Dec 2021 12:01:45 -0500 Message-ID: References: <164050498800.16109.15750247324383386226@vcs2.savannah.gnu.org> <20211226074949.441EEC0CEBF@vcs2.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9944"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Jonas Bernoulli Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 26 18:07:47 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n1Wzr-0002OJ-CO for ged-emacs-devel@m.gmane-mx.org; Sun, 26 Dec 2021 18:07:47 +0100 Original-Received: from localhost ([::1]:33936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n1Wzp-0002oL-8a for ged-emacs-devel@m.gmane-mx.org; Sun, 26 Dec 2021 12:07:45 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38592) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n1Wu8-0004Te-37 for emacs-devel@gnu.org; Sun, 26 Dec 2021 12:01:52 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:42461) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n1Wu5-00025q-UA for emacs-devel@gnu.org; Sun, 26 Dec 2021 12:01:51 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 2467F440FC4; Sun, 26 Dec 2021 12:01:48 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id E8A4C440C72; Sun, 26 Dec 2021 12:01:46 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1640538106; bh=j2X0cA8Oneu8F4duo4ASv3HCjhHf4EFyfkNX/Y/Iz9A=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Tug3Pn1MUhZZko1xXZV8/VBqbTnThM5xzHFRFVDlhhZurYGjRR+dngaaCfur5ial+ SOFioED7+uVmARrewxIGjAgnIDyntolLKnVEiholsWdcaClPSW5KQqt5EsjnUCWjc5 mWbT6xmk60x9GraBw1opzQzZzeZQoZvI9Erjb+Ft9W2WW/9Szu0mXds1yJLyEQXA4e UrWWFGvHd1/8byaUmpq96ah+sU4umxfIdKKPMaVWEawN+RhgV9Eaj2sQcIPdeU3EZ4 3R+5Ks3pbeW0PQTsXx/281tbulT+oEcpn9GYsp2Uw7Gkh1d17bZm6zobG2EV4en0dX n9inzMfeeKV1g== Original-Received: from pastel (unknown [216.154.30.173]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id C1A5D12031C; Sun, 26 Dec 2021 12:01:46 -0500 (EST) In-Reply-To: <20211226074949.441EEC0CEBF@vcs2.savannah.gnu.org> (Jonas Bernoulli's message of "Sun, 26 Dec 2021 02:49:49 -0500 (EST)") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:283340 Archived-At: > --- a/lisp/transient.el > +++ b/lisp/transient.el > @@ -3638,6 +3638,19 @@ search instead." > > ;;;; Miscellaneous > > +(with-eval-after-load 'lisp-mode > + (cl-pushnew (list nil (concat "^\\s-*(" > + (eval-when-compile > + (regexp-opt > + '("transient-define-prefix" > + "transient-define-suffix" > + "transient-define-infix" > + "transient-define-argument") > + t)) > + "\\s-+\\(" lisp-mode-symbol-regexp "\\)") > + 2) > + lisp-imenu-generic-expression :test #'equal)) Hmm... `lisp-mode` doesn't seem right since that's the mode used for Common-Lisp (yes, I know, here you're referring to the file, which confusingly defines a lot more than just the `lisp-mode`). I think `elisp-mode` would be closer to the truth. Then again, they're both preloaded, so the `with-eval-after-load` can be completely skipped. BTW, I wish we had some kind of `register-defining-form` function which would take care of tweaking the `imenu-generic-expression` as well as the `font-lock-keywords` of elisp-mode. Stefan