unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Simplifying & improving lisp-imenu-generic-expression
@ 2023-03-11 19:05 Sean Whitton
  2023-03-11 19:15 ` Sean Whitton
  0 siblings, 1 reply; 2+ messages in thread
From: Sean Whitton @ 2023-03-11 19:05 UTC (permalink / raw)
  To: emacs-devel

Hello,

When writing CL you end up adding a bunch of your own defining forms.
E.g. my Consfigurator project has files full of defprop, defproplist and
defpropspec instead of defun.

The convention on naming these is such that something like

    (concat
     "\\(?:cl-\\)def\\(?:ine-\\)\\sw+\\s_*\\s-+ '?\\("
     (rx lisp-mode-symbol)
     "\\)")

ought to catch all of them.

The only part of lisp-imenu-generic-expression that this doesn't account
for is ignoring (defvar FOO) declarations, but that could probably be
added too.

Am I missing something obvious why this couldn't replace
lisp-imenu-generic-expression?  It's simpler, and has the significant
advantage that user's own defining forms will be automatically included.

-- 
Sean Whitton



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

* Re: Simplifying & improving lisp-imenu-generic-expression
  2023-03-11 19:05 Simplifying & improving lisp-imenu-generic-expression Sean Whitton
@ 2023-03-11 19:15 ` Sean Whitton
  0 siblings, 0 replies; 2+ messages in thread
From: Sean Whitton @ 2023-03-11 19:15 UTC (permalink / raw)
  To: emacs-devel

Hello,

On Sat 11 Mar 2023 at 12:05PM -07, Sean Whitton wrote:

> Am I missing something obvious why this couldn't replace
> lisp-imenu-generic-expression?  It's simpler, and has the significant
> advantage that user's own defining forms will be automatically included.

... ah, this doesn't include the MENU-TITLE field.

Okay: how about adding an "Other definitions" entry along the lines I
suggest?

-- 
Sean Whitton



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

end of thread, other threads:[~2023-03-11 19:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-11 19:05 Simplifying & improving lisp-imenu-generic-expression Sean Whitton
2023-03-11 19:15 ` Sean Whitton

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