[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#8638: 24.0.50; Imenu should not include vacuous defvars
From: |
Drew Adams |
Subject: |
bug#8638: 24.0.50; Imenu should not include vacuous defvars |
Date: |
Fri, 27 May 2011 09:00:13 -0700 |
> FWIW, this is what I use in my code (imenu+.el):
> (concat "^\\s-*("
> (regexp-opt
> '("defvar" "defconst" "defconstant" "defcustom"
> "defparameter" "define-symbol-macro") t)
> "\\s-+\\(\\sw\\(\\sw\\|\\s_\\)+\\)"
> "\\s-+[^) \t\n]")
> Not perfect, perhaps, but it seems to do the job OK so far.
FWIW, I use this now.
Changed the whitespace match after var name.
(concat "^\\s-*("
(regexp-opt
'("defvar" "defconst" "defconstant" "defcustom"
"defparameter" "define-symbol-macro") t)
"\\s-+\\(\\sw\\(\\sw\\|\\s_\\)+\\)"
"\\(\\s-\\|[\n]\\)+" ; \n has char syntax `>', not `-'
"[^) \t\n]")
\s-+ does not match newlines in Lisp modes (newlines have comment-end syntax),
so I changed \s-+ to \(\s-\|[\n]\)+. No doubt still not perfect, but seems to
work OK.
- bug#8638: 24.0.50; Imenu should not include vacuous defvars, (continued)
- bug#8638: 24.0.50; Imenu should not include vacuous defvars, Drew Adams, 2011/05/08
- bug#8638: 24.0.50; Imenu should not include vacuous defvars, Juanma Barranquero, 2011/05/08
- bug#8638: 24.0.50; Imenu should not include vacuous defvars, Drew Adams, 2011/05/08
- bug#8638: 24.0.50; Imenu should not include vacuous defvars, Juanma Barranquero, 2011/05/08
- bug#8638: 24.0.50; Imenu should not include vacuous defvars, Juanma Barranquero, 2011/05/08
- bug#8638: 24.0.50; Imenu should not include vacuous defvars, Drew Adams, 2011/05/08
- bug#8638: 24.0.50; Imenu should not include vacuous defvars, Juanma Barranquero, 2011/05/08
- bug#8638: 24.0.50; Imenu should not include vacuous defvars, Drew Adams, 2011/05/08
- bug#8638: 24.0.50; Imenu should not include vacuous defvars, Juanma Barranquero, 2011/05/08
- bug#8638: 24.0.50; Imenu should not include vacuous defvars, Drew Adams, 2011/05/08
- bug#8638: 24.0.50; Imenu should not include vacuous defvars,
Drew Adams <=
bug#8638: 24.0.50; Imenu should not include vacuous defvars, Stefan Monnier, 2011/05/09