unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: [elpa] externals/transient 459e28e28a 03/11: Add lisp-imenu-generic-expression entry
       [not found] ` <20211226074949.441EEC0CEBF@vcs2.savannah.gnu.org>
@ 2021-12-26 17:01   ` Stefan Monnier
  2021-12-27 19:00     ` Jonas Bernoulli
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier @ 2021-12-26 17:01 UTC (permalink / raw)
  To: Jonas Bernoulli; +Cc: emacs-devel

> --- 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




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [elpa] externals/transient 459e28e28a 03/11: Add lisp-imenu-generic-expression entry
  2021-12-26 17:01   ` [elpa] externals/transient 459e28e28a 03/11: Add lisp-imenu-generic-expression entry Stefan Monnier
@ 2021-12-27 19:00     ` Jonas Bernoulli
  0 siblings, 0 replies; 2+ messages in thread
From: Jonas Bernoulli @ 2021-12-27 19:00 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> +(with-eval-after-load 'lisp-mode

> Then again, they're both preloaded, so the `with-eval-after-load` can be
> completely skipped.

Done.  I won't push that until in a few days to avoid some rebasing.

> 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.

Sure, that would be nice.  ;)

Or (declare something).

     Jonas



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-27 19:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <164050498800.16109.15750247324383386226@vcs2.savannah.gnu.org>
     [not found] ` <20211226074949.441EEC0CEBF@vcs2.savannah.gnu.org>
2021-12-26 17:01   ` [elpa] externals/transient 459e28e28a 03/11: Add lisp-imenu-generic-expression entry Stefan Monnier
2021-12-27 19:00     ` Jonas Bernoulli

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).