From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#8638: 24.0.50; Imenu should not include vacuous defvars Date: Mon, 09 May 2011 11:19:34 -0300 Message-ID: References: <6A3327809B8B440D99CDCDCED77E9575@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1304950817 8464 80.91.229.12 (9 May 2011 14:20:17 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 9 May 2011 14:20:17 +0000 (UTC) Cc: 8638@debbugs.gnu.org To: Juanma Barranquero Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 09 16:20:10 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QJRJg-00017P-IV for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 May 2011 16:20:08 +0200 Original-Received: from localhost ([::1]:35457 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QJRJf-0000Yo-WA for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 May 2011 10:20:07 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:39055) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QJRJd-0000XQ-AM for bug-gnu-emacs@gnu.org; Mon, 09 May 2011 10:20:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QJRJc-0003BI-8r for bug-gnu-emacs@gnu.org; Mon, 09 May 2011 10:20:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58833) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QJRJc-0003BB-77 for bug-gnu-emacs@gnu.org; Mon, 09 May 2011 10:20:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QJRJb-0000hc-8e; Mon, 09 May 2011 10:20:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 May 2011 14:20:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8638 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 8638-submit@debbugs.gnu.org id=B8638.13049507852671 (code B ref 8638); Mon, 09 May 2011 14:20:03 +0000 Original-Received: (at 8638) by debbugs.gnu.org; 9 May 2011 14:19:45 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QJRJI-0000h2-MX for submit@debbugs.gnu.org; Mon, 09 May 2011 10:19:44 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QJRJG-0000gp-Cn for 8638@debbugs.gnu.org; Mon, 09 May 2011 10:19:42 -0400 Original-Received: from 213-159-126-200.fibertel.com.ar ([200.126.159.213]:42306 helo=ceviche.home) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QJRJA-0004sC-Nn; Mon, 09 May 2011 10:19:36 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id C0B8B666B3; Mon, 9 May 2011 11:19:34 -0300 (ART) In-Reply-To: (Juanma Barranquero's message of "Sun, 8 May 2011 20:50:37 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 09 May 2011 10:20:03 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:46351 Archived-At: >> Could we please improve `lisp-imenu-generic-expression so that it does >> not include vacuous defvars such as (defvar foobar), which are generally >> used only to quiet the byte-compiler? > With lexical binding, (defvar foobar) is used to tell the bytecompiler > that the variable has dynamic scope. While it is true some some (defvar ) are actually declarations that is a locally-used dynamically bound variable (in which case, maybe it could make sense to see it in imenu), the overwhelming majority is to declare the existence of some variable in some other package, in which case I don't think it deserves to be in imenu. And even when it might make sense, its usefulness seems dubious since those defvars don't hold much valuable info (like initial value, docstring, or something). So I'd tend to agree with Drew. For completion purposes, we'd want to pay attention to those defvars, but not for imenu. Stefan