GNU bug report logs -
#8638
24.0.50; Imenu should not include vacuous defvars
Previous Next
Reported by: "Drew Adams" <drew.adams <at> oracle.com>
Date: Sun, 8 May 2011 18:16:01 UTC
Severity: minor
Found in version 24.0.50
Done: Chong Yidong <cyd <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #61 received at 8638 <at> debbugs.gnu.org (full text, mbox):
> > OK, thanks. But I wonder why you treated defvar differently from
> > defconst, defconstant, defcustom, defparameter, and
> > define-symbol-macro here. Shouldn't the same thing apply to them?
>
> There is no such thing as (defconst foo), or (defcustom foo);
> the second argument is non-optional.
Yes, I know.
> So the reasoning which was used for defvar, i.e. that a defvar
> with an omitted second arg is commonly used just to silence the
> compiler, does not apply.
But the reasoning that such things, if they ever occurred, would not represent
proper definitions, so Imenu should not index them, holds. They would represent
incorrect syntax (i.e., errors), and should not be indexed.
Anyway, I'm OK with them being falsely indexed, and I would agree if you made
the argument that we do not try to prevent indexing of incorrect syntax in
general.
This bug report was last modified 12 years and 290 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.