From unknown Tue Jun 17 20:40:03 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#8638 <8638@debbugs.gnu.org> To: bug#8638 <8638@debbugs.gnu.org> Subject: Status: 24.0.50; Imenu should not include vacuous defvars Reply-To: bug#8638 <8638@debbugs.gnu.org> Date: Wed, 18 Jun 2025 03:40:03 +0000 retitle 8638 24.0.50; Imenu should not include vacuous defvars reassign 8638 emacs submitter 8638 "Drew Adams" severity 8638 minor thanks From debbugs-submit-bounces@debbugs.gnu.org Sun May 08 14:15:32 2011 Received: (at submit) by debbugs.gnu.org; 8 May 2011 18:15:32 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QJ8Vw-0002Sj-56 for submit@debbugs.gnu.org; Sun, 08 May 2011 14:15:32 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QJ8Vu-0002Ke-HW for submit@debbugs.gnu.org; Sun, 08 May 2011 14:15:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QJ8Vo-0003eJ-9Z for submit@debbugs.gnu.org; Sun, 08 May 2011 14:15:25 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:35299) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QJ8Vo-0003eF-85 for submit@debbugs.gnu.org; Sun, 08 May 2011 14:15:24 -0400 Received: from eggs.gnu.org ([140.186.70.92]:33931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QJ8Vn-0005tV-9B for bug-gnu-emacs@gnu.org; Sun, 08 May 2011 14:15:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QJ8Vm-0003ds-CU for bug-gnu-emacs@gnu.org; Sun, 08 May 2011 14:15:23 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]:63939) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QJ8Vm-0003dX-5G for bug-gnu-emacs@gnu.org; Sun, 08 May 2011 14:15:22 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p48IFHQq027283 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 8 May 2011 18:15:19 GMT Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p48IFGms000904 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 8 May 2011 18:15:17 GMT Received: from abhmt007.oracle.com (abhmt007.oracle.com [141.146.116.16]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p48IFBUv032065 for ; Sun, 8 May 2011 13:15:11 -0500 Received: from dradamslap1 (/10.159.41.120) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 08 May 2011 11:15:10 -0700 From: "Drew Adams" To: Subject: 24.0.50; Imenu should not include vacuous defvars Date: Sun, 8 May 2011 11:15:01 -0700 Message-ID: <6A3327809B8B440D99CDCDCED77E9575@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcwNq9iEYJgiklwaQZym1DFfzICIiQ== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090 X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090202.4DC6DDB7.0043:SCFMA922111,ss=1,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -6.5 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.5 (------) 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? In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600) of 2011-04-25 on 3249CTO Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (4.5) --no-opt --cflags -Ic:/imagesupport/include' From debbugs-submit-bounces@debbugs.gnu.org Sun May 08 14:51:25 2011 Received: (at 8638) by debbugs.gnu.org; 8 May 2011 18:51:25 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QJ94e-0004wR-W2 for submit@debbugs.gnu.org; Sun, 08 May 2011 14:51:25 -0400 Received: from mail-yw0-f44.google.com ([209.85.213.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QJ94c-0004wD-SJ for 8638@debbugs.gnu.org; Sun, 08 May 2011 14:51:23 -0400 Received: by ywi6 with SMTP id 6so1663513ywi.3 for <8638@debbugs.gnu.org>; Sun, 08 May 2011 11:51:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=drtBKjJknk0T+ga0/5zr1e7g+yYiIFAi+Ux5xGSVhus=; b=vlNoEujPiHKXIVBZTIcNAuSQi4PqxjnE7rSckO2KevuJRCPwXuopNbnVF/P2CG+6F1 sY7AOFo2wDgr9jLCyxgr9zuom+js8reUlrK80AEg07sjPW1mG+AUfK6BzYptwpFYE7uv o9bfSE1jhPaTiLeqScjZZiwbK8jlSlZ/bCb+w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=DIwaHAoruwi9gCtFn81FXtRsEY7k9WYfF+txB/gsonsqnWgW0Q4K5eTv+ZwxjRJFTz Ly3BxKRPZdOb7c8gmlvocdwMBznkp7jrf+EdwFwiJzEiUD9pO9ToOuLbajNaQ1aCVEDd bdQq/C4QHbPdFBXgo9xKWAD5oIRTp+Grdl/lc= Received: by 10.146.8.34 with SMTP id 34mr673009yah.28.1304880677150; Sun, 08 May 2011 11:51:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.147.182.5 with HTTP; Sun, 8 May 2011 11:50:37 -0700 (PDT) In-Reply-To: <6A3327809B8B440D99CDCDCED77E9575@us.oracle.com> References: <6A3327809B8B440D99CDCDCED77E9575@us.oracle.com> From: Juanma Barranquero Date: Sun, 8 May 2011 20:50:37 +0200 Message-ID: Subject: Re: bug#8638: 24.0.50; Imenu should not include vacuous defvars To: Drew Adams Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.3 (---) X-Debbugs-Envelope-To: 8638 Cc: 8638@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.3 (---) On Sun, May 8, 2011 at 20:15, Drew Adams wrote: > 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. =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Sun May 08 15:07:57 2011 Received: (at 8638) by debbugs.gnu.org; 8 May 2011 19:07:57 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QJ9Ke-0005Iz-Lu for submit@debbugs.gnu.org; Sun, 08 May 2011 15:07:56 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QJ9Kc-0005Im-JX for 8638@debbugs.gnu.org; Sun, 08 May 2011 15:07:55 -0400 Received: from rtcsinet22.oracle.com (rtcsinet22.oracle.com [66.248.204.30]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p48J7k0s003221 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 8 May 2011 19:07:48 GMT Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by rtcsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p48J7jcK010563 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 8 May 2011 19:07:46 GMT Received: from abhmt019.oracle.com (abhmt019.oracle.com [141.146.116.28]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p48J7emD021291; Sun, 8 May 2011 14:07:40 -0500 Received: from dradamslap1 (/10.159.41.120) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 08 May 2011 12:07:39 -0700 From: "Drew Adams" To: "'Juanma Barranquero'" References: <6A3327809B8B440D99CDCDCED77E9575@us.oracle.com> Subject: RE: bug#8638: 24.0.50; Imenu should not include vacuous defvars Date: Sun, 8 May 2011 12:07:31 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcwNsO5Hw8NEN83XTo2bQ0fSlUWB8wAAGx6g X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090 X-Source-IP: rtcsinet22.oracle.com [66.248.204.30] X-CT-RefId: str=0001.0A090209.4DC6EA04.00D9:SCFSTAT5015188,ss=1,fgs=0 X-Spam-Score: -6.5 (------) X-Debbugs-Envelope-To: 8638 Cc: 8638@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.5 (------) > With lexical binding, (defvar foobar) is used to tell the bytecompiler > that the variable has dynamic scope. It's still a vacuous definition. And any defvar tells the byte compiler that a variable has dynamic scope, no? This seems irrelevant to the bug report. I'd still suggest removing vacuous defvars from the menu. Mixing in vacuous entries with entries that really define variables distracts users. You want to think that accessing a menu item will take you to a real variable definition. If someone wants to provide vacuous defvars in a different submenu from `Variables' (e.g. `Vacuous Vars') I have no problem with that. But I don't really think that's needed. 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. From debbugs-submit-bounces@debbugs.gnu.org Sun May 08 15:26:19 2011 Received: (at 8638) by debbugs.gnu.org; 8 May 2011 19:26:19 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QJ9cQ-0005hj-KH for submit@debbugs.gnu.org; Sun, 08 May 2011 15:26:19 -0400 Received: from mail-yi0-f44.google.com ([209.85.218.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QJ9cP-0005hX-9x for 8638@debbugs.gnu.org; Sun, 08 May 2011 15:26:17 -0400 Received: by yic13 with SMTP id 13so1666946yic.3 for <8638@debbugs.gnu.org>; Sun, 08 May 2011 12:26:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=B9HHxg41tAGx7QWdZkzzl6gcbX/4l/qWQkzugPrfG5w=; b=KjzMiE4qaJ7mdFZvfjsOG4DqmyIs/ZFE8XV1U3+Im2NJ9s/Wc8TxOjb2MQ9uQJN9RV hDtLe9+4WPssJ5B7idw03mUBlVcgkKY8dA66jXcw0397QiWFeuQir82JmZw5uudjtekb bcpTzwgZ0T0Ko+osva0OMKnfz9dCKxYkIRdDE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=OkDm+LzQOMUwBl2Y877UnzAhhskrqnacdlKNOa4q53aGN3BGgxDgbuM0A5wkveqHWI /9uGb9vvMt2PaHO55o1jScycQRXNgu/1LK7eOkjNGF4o3wXb5xMvvKtUdBwiNwX0PMYR DO//d5g5gegZ5xFS33wrF1BaohxKp1xS7ecmA= Received: by 10.150.214.11 with SMTP id m11mr5547673ybg.254.1304882771613; Sun, 08 May 2011 12:26:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.147.182.5 with HTTP; Sun, 8 May 2011 12:25:29 -0700 (PDT) In-Reply-To: References: <6A3327809B8B440D99CDCDCED77E9575@us.oracle.com> From: Juanma Barranquero Date: Sun, 8 May 2011 21:25:29 +0200 Message-ID: Subject: Re: bug#8638: 24.0.50; Imenu should not include vacuous defvars To: Drew Adams Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.3 (---) X-Debbugs-Envelope-To: 8638 Cc: 8638@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.3 (---) > It's still a vacuous definition. =C2=A0And any defvar tells the byte comp= iler that a > variable has dynamic scope, no? It also tells the user, so having them in the imenu doesn't seem superfluous to me (I'm talking again of lexically-scoped packages). =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Sun May 08 15:36:51 2011 Received: (at 8638) by debbugs.gnu.org; 8 May 2011 19:36:51 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QJ9md-0005we-3b for submit@debbugs.gnu.org; Sun, 08 May 2011 15:36:51 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QJ9mb-0005wR-2f for 8638@debbugs.gnu.org; Sun, 08 May 2011 15:36:49 -0400 Received: from rtcsinet22.oracle.com (rtcsinet22.oracle.com [66.248.204.30]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p48JafsJ024848 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 8 May 2011 19:36:43 GMT Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by rtcsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p48Jad3O021949 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 8 May 2011 19:36:40 GMT Received: from abhmt009.oracle.com (abhmt009.oracle.com [141.146.116.18]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p48JaYwq012918; Sun, 8 May 2011 14:36:34 -0500 Received: from dradamslap1 (/10.159.41.120) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 08 May 2011 12:36:34 -0700 From: "Drew Adams" To: "'Juanma Barranquero'" References: <6A3327809B8B440D99CDCDCED77E9575@us.oracle.com> Subject: RE: bug#8638: 24.0.50; Imenu should not include vacuous defvars Date: Sun, 8 May 2011 12:36:25 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcwNtc5mi7LumzveTXS5xlfisbi5YAAAMVLQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090 X-Source-IP: rtcsinet22.oracle.com [66.248.204.30] X-CT-RefId: str=0001.0A090205.4DC6F0CB.0078:SCFSTAT5015188,ss=1,fgs=0 X-Spam-Score: -6.5 (------) X-Debbugs-Envelope-To: 8638 Cc: 8638@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.5 (------) > > It's still a vacuous definition. =A0And any defvar tells the=20 > > byte compiler that a variable has dynamic scope, no? >=20 > It also tells the user, so having them in the imenu doesn't seem > superfluous to me (I'm talking again of lexically-scoped packages). Submenu `Variables' should be for variable definitions, not vacuous = defvars that might be used to indicate something to the byte compiler. As I said, if you want to also present those to the user, then let's put = them in a separate submenu. They amount to byte-compiler declarations. = Perhaps there are other byte-compiler-related constructs that could also be added to = the same submenu. Call it `Byte-Compiler' or `Declarations', perhaps. But these are not variable definitions in the same sense as full defvars = are. Mixing them in with full definitions, in the same submenu, just amounts = to noise. Separating them out in a separate menu would be fine. From debbugs-submit-bounces@debbugs.gnu.org Sun May 08 15:47:02 2011 Received: (at 8638) by debbugs.gnu.org; 8 May 2011 19:47:02 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QJ9wU-0006AW-C6 for submit@debbugs.gnu.org; Sun, 08 May 2011 15:47:02 -0400 Received: from mail-gy0-f172.google.com ([209.85.160.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QJ9wS-0006A6-VI for 8638@debbugs.gnu.org; Sun, 08 May 2011 15:47:01 -0400 Received: by gyf3 with SMTP id 3so1670584gyf.3 for <8638@debbugs.gnu.org>; Sun, 08 May 2011 12:46:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=s6fu7y1iZUq1XrJhYbs4f+7/g7zI0mF0dmFqfBkmIL8=; b=oUgEDgt38bakzS8KbD/t25SS0lHzOAJg6Aj7a4ws88BVQlZKvd9QxgrRUFZVS+S++h DQLHJRsle5lSAnOSNxdYzIVFjwlv+rtm5LRvyctejuBBQAmhFgiid87IQ2GMZxXslt0A g/NqCSadUn6WFAbZacJGC/flEE+VGdh9l4GuQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=bucPxXxilfjEG5Erq4PkjbmLkbbl4cNc4DEE8YLSrdshLTstPO2sX/i01NThtMpabZ rjPxlSE9xLEAq22qCvPMDW7zoEVzguTQlQxGB4UC4fuafY0ivnNRX1yH0iGahp9FVbrL +rctDOdgJFzmb04IlBuIQz3rVdvWifF123s5U= Received: by 10.236.193.100 with SMTP id j64mr7378554yhn.294.1304884015148; Sun, 08 May 2011 12:46:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.147.182.5 with HTTP; Sun, 8 May 2011 12:46:15 -0700 (PDT) In-Reply-To: References: <6A3327809B8B440D99CDCDCED77E9575@us.oracle.com> From: Juanma Barranquero Date: Sun, 8 May 2011 21:46:15 +0200 Message-ID: Subject: Re: bug#8638: 24.0.50; Imenu should not include vacuous defvars To: Drew Adams Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.3 (---) X-Debbugs-Envelope-To: 8638 Cc: 8638@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.3 (---) On Sun, May 8, 2011 at 21:36, Drew Adams wrote: > But these are not variable definitions in the same sense as full defvars = are. I disagree. IMHO, in a lexical binding package, yes, there are variable definitions. In some cases the variables are documented in the docstring of a function or somesuch, but they are real variables nonetheless. Instead of sweeping them under the carpet, perhaps it would be better to suggest the programmer to add proper docstrings and initial values to them. =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Sun May 08 15:47:20 2011 Received: (at 8638) by debbugs.gnu.org; 8 May 2011 19:47:20 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QJ9wl-0006Az-J1 for submit@debbugs.gnu.org; Sun, 08 May 2011 15:47:19 -0400 Received: from mail-gy0-f172.google.com ([209.85.160.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QJ9wk-0006A6-8i for 8638@debbugs.gnu.org; Sun, 08 May 2011 15:47:18 -0400 Received: by mail-gy0-f172.google.com with SMTP id 3so1670584gyf.3 for <8638@debbugs.gnu.org>; Sun, 08 May 2011 12:47:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=akjtgDmcoYRO3f8Vn8nFKYe3F2LSaJEKsxn8LgGrYjE=; b=kd4wxBUVNcgVXw2Y9sui6yczd4zZ6iDg32xNa2EyF/jQ+saAUC0AXebRXH494XKkeY L+Wq5egodvQ7hWy8rgvMq+qLnVsEh2xsnckHEuhYfrc9hbvFeg6RZBMqFT8CZUU/v4jB cDLMS/ozebk9n/khVs5o7OnPSa4ksw/LoK6v8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=TU/RekUP3xXftCX+8QtnmvO8zAg8yG2zHjVDDKRIOXUX3qaUAShjSalnT2ebeNX1Nc Q9ViV2ehEcH46dR6owY4eKlZrADKXPYHh636h2bCSoxaMf18q9Bkd9zuNaK6VjsF3DvE +D2Zg7mDQVjhTdF6YaB8jlo3BNSl0uLF+RXK8= Received: by 10.236.182.162 with SMTP id o22mr6783127yhm.495.1304884038045; Sun, 08 May 2011 12:47:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.147.182.5 with HTTP; Sun, 8 May 2011 12:46:38 -0700 (PDT) In-Reply-To: References: <6A3327809B8B440D99CDCDCED77E9575@us.oracle.com> From: Juanma Barranquero Date: Sun, 8 May 2011 21:46:38 +0200 Message-ID: Subject: Re: bug#8638: 24.0.50; Imenu should not include vacuous defvars To: Drew Adams Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.3 (---) X-Debbugs-Envelope-To: 8638 Cc: 8638@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.3 (---) > I disagree. IMHO, in a lexical binding package, yes, there are s/there/they/ =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Sun May 08 16:03:37 2011 Received: (at 8638) by debbugs.gnu.org; 8 May 2011 20:03:37 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QJACW-0006Wg-VJ for submit@debbugs.gnu.org; Sun, 08 May 2011 16:03:37 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QJACU-0006WR-4M for 8638@debbugs.gnu.org; Sun, 08 May 2011 16:03:34 -0400 Received: from rtcsinet22.oracle.com (rtcsinet22.oracle.com [66.248.204.30]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p48K3PVm011413 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 8 May 2011 20:03:27 GMT Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by rtcsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p48K3Ouj001229 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 8 May 2011 20:03:25 GMT Received: from abhmt004.oracle.com (abhmt004.oracle.com [141.146.116.13]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p48K3JZ4010886; Sun, 8 May 2011 15:03:19 -0500 Received: from dradamslap1 (/10.159.41.120) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 08 May 2011 13:03:19 -0700 From: "Drew Adams" To: "'Juanma Barranquero'" References: <6A3327809B8B440D99CDCDCED77E9575@us.oracle.com> Subject: RE: bug#8638: 24.0.50; Imenu should not include vacuous defvars Date: Sun, 8 May 2011 13:03:10 -0700 Message-ID: <567CCE5B717E445496B4F685457F16AB@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcwNuLPit31Vr3W/Sf+BKE/xetsgKAAAQh6g X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090 X-Source-IP: rtcsinet22.oracle.com [66.248.204.30] X-CT-RefId: str=0001.0A090209.4DC6F710.0054:SCFSTAT5015188,ss=1,fgs=0 X-Spam-Score: -6.5 (------) X-Debbugs-Envelope-To: 8638 Cc: 8638@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.5 (------) > I disagree. IMHO, in a lexical binding package, yes, there are > variable definitions. In some cases the variables are documented in > the docstring of a function or somesuch, but they are real variables > nonetheless. Instead of sweeping them under the carpet, perhaps it > would be better to suggest the programmer to add proper docstrings and > initial values to them. No one is sweeping anything under the carpet. If you want to show them in an Imenu menu, fine; just don't mix them in with definitions that people will want to visit to see doc strings and initial values. That programmers should be encouraged to use doc strings and specify initial values is a separate issue. That does not imply that vacuous defvars should be included in the Variables menu. As a signal to the byte compiler, a vacuous definition is useful - as such. That's what it is for. By definition it should not have an initial value or doc string. That a vacuous definition, like a full one, is now used also to declare a variable special (dynamic scoping) does not mean that vacuous defvars should be included in the Variables menu. Whether a vacuous definition should indicate dynamic scope to the byte-compiler is another question. As you say, in most cases what we want to suggest is that programmers use a full definition for that, instead. But using a vacuous definition to quiet undefined var warnings is legitimate - in that case the programmer does _not_ want to include any initial value. IMO, you are mixing in things that don't belong to this thread. A defvar that is used _only_ as a byte-compiler declaration and not to provide an initial value (and hopefully a doc string) does not belong in the same submenu as full definitions. When you follow a Variables menu entry to its code, you want to see what the code for the variable is. You do not want to see only a vacuous defvar that provides no more information than the menu item itself. From debbugs-submit-bounces@debbugs.gnu.org Sun May 08 16:30:20 2011 Received: (at 8638) by debbugs.gnu.org; 8 May 2011 20:30:20 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QJAcN-00076X-BE for submit@debbugs.gnu.org; Sun, 08 May 2011 16:30:19 -0400 Received: from mail-gx0-f172.google.com ([209.85.161.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QJAcL-00076L-W1 for 8638@debbugs.gnu.org; Sun, 08 May 2011 16:30:18 -0400 Received: by gxk19 with SMTP id 19so1691314gxk.3 for <8638@debbugs.gnu.org>; Sun, 08 May 2011 13:30:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=D13rmMWDSP4DBt1sNl+TzEdEdRN69scOjLV+oAmY1kQ=; b=SEm02Thg3RN9JqhUToT0nAcPRaZZ0TpBW6OsxHGNpycRMsNjim0LSGD1bUmme33Csq ytePTLO2YQAqgH7DlBLkkcWf9IFx2XS4Sa3kXPBGuw6LmEYbo7+1pBLv/fw9SpLDgJtF rOQ6X+Mm+asyKQvxCszrWtr6pftS4LmrCB07M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=frA8doZvor1CRrE0AhrRYPhD7Z4Hqm0tIcytGIpLcJ2VFsS5s4T3zD9Z7IdPO2VXDE 2DhBVHVkc7wU1yeh9lqVTNpD9Ms8Ou3KfNiGKO3teAApVg/VUxM4PS436glrXPmp4ZoW tPH3vnxJ9aseXu7ageyCPkOIcj/6llyiFDlD0= Received: by 10.236.193.100 with SMTP id j64mr7404882yhn.294.1304886612199; Sun, 08 May 2011 13:30:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.147.182.5 with HTTP; Sun, 8 May 2011 13:29:32 -0700 (PDT) In-Reply-To: <567CCE5B717E445496B4F685457F16AB@us.oracle.com> References: <6A3327809B8B440D99CDCDCED77E9575@us.oracle.com> <567CCE5B717E445496B4F685457F16AB@us.oracle.com> From: Juanma Barranquero Date: Sun, 8 May 2011 22:29:32 +0200 Message-ID: Subject: Re: bug#8638: 24.0.50; Imenu should not include vacuous defvars To: Drew Adams Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.3 (---) X-Debbugs-Envelope-To: 8638 Cc: 8638@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.3 (---) On Sun, May 8, 2011 at 22:03, Drew Adams wrote: > When you follow a Variables menu entry to its code, you want to see what = the > code for the variable is. =C2=A0You do not want to see only a vacuous def= var that > provides no more information than the menu item itself. The imenu index is not documentation. It is an index to code. So if the "vacuous variable" has twenty lines of comment explaining its purpose and why it does not have or require a docstring or an initial value, I fully expect imenu to help me get there too, just as if it were a normal, "full" variable. Your expectations for imenu are just that, your expectations. I prefer to be the judge of what it is interesting in the code and what is not, not some imenu filter. But that's just my opinion. I'm not going to complain if someone fixes this bug to your liking. =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Sun May 08 16:39:39 2011 Received: (at 8638) by debbugs.gnu.org; 8 May 2011 20:39:39 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QJAlP-0007MA-2p for submit@debbugs.gnu.org; Sun, 08 May 2011 16:39:39 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QJAlN-0007Lx-9r for 8638@debbugs.gnu.org; Sun, 08 May 2011 16:39:37 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p48KdTSp005878 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 8 May 2011 20:39:31 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p48KdTkL007812 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 8 May 2011 20:39:29 GMT Received: from abhmt015.oracle.com (abhmt015.oracle.com [141.146.116.24]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p48KdNqH006231; Sun, 8 May 2011 15:39:23 -0500 Received: from dradamslap1 (/10.159.41.120) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 08 May 2011 13:39:23 -0700 From: "Drew Adams" To: "'Juanma Barranquero'" References: <6A3327809B8B440D99CDCDCED77E9575@us.oracle.com> <567CCE5B717E445496B4F685457F16AB@us.oracle.com> Subject: RE: bug#8638: 24.0.50; Imenu should not include vacuous defvars Date: Sun, 8 May 2011 13:39:14 -0700 Message-ID: <32CD2BCD32154EF29904F03720801519@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcwNvr/RVcvWjnekQ5qS9UUC+uZ5SwAAMIzw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090 X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090205.4DC6FF83.00E9:SCFMA922111,ss=1,fgs=0 X-Spam-Score: -6.5 (------) X-Debbugs-Envelope-To: 8638 Cc: 8638@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.5 (------) > > When you follow a Variables menu entry to its code, you=20 > > want to see what the code for the variable is. =A0You do not > > want to see only a vacuous defvar that > > provides no more information than the menu item itself. >=20 > The imenu index is not documentation. It is an index to code. So if > the "vacuous variable" has twenty lines of comment explaining its > purpose and why it does not have or require a docstring or an initial > value, I fully expect imenu to help me get there too, just as if it > were a normal, "full" variable. Your expectations for imenu are just > that, your expectations. I prefer to be the judge of what it is > interesting in the code and what is not, not some imenu filter. >=20 > But that's just my opinion. I'm not going to complain if someone fixes > this bug to your liking. I understand. How would you feel if Imenu included entries for defuns = and defvars that are commented out? Wouldn't you want Imenu to judge that = you are not interested in those? Certainly comments that include defuns and such could be important and interesting to developers. The question is what Imenu should include, = and yes, it is a judgment call based on expectations of what most users will = want/expect. From debbugs-submit-bounces@debbugs.gnu.org Sun May 08 16:52:53 2011 Received: (at 8638) by debbugs.gnu.org; 8 May 2011 20:52:53 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QJAyD-0008Qh-IN for submit@debbugs.gnu.org; Sun, 08 May 2011 16:52:53 -0400 Received: from mail-gx0-f172.google.com ([209.85.161.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QJAyB-0008QV-QB for 8638@debbugs.gnu.org; Sun, 08 May 2011 16:52:52 -0400 Received: by gxk19 with SMTP id 19so1693904gxk.3 for <8638@debbugs.gnu.org>; Sun, 08 May 2011 13:52:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=EZEa9aPUZTqegC44eeS78GrOU7qPJs0+JiwPopz3zaI=; b=xrPd6MtRFNzGf+Y/d4so9dBsMSwGiMeRU4Mgh2F0IQKZoFlGuc5Guby+bOIFe0AY2R lKcwY36ujiTpbwA+xHD41Ik73jSvjh5kuobxxE2B0FWJrbNLDGYRRyReGPcXX5ToeXsW 2UPk4UaPkt/Qn+9LZeobsFL8b/gKvnU3Rmnwo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=Fvf3UYOiG9QCVk6h1+oE9jEAtu6nsN5PSr1CLDi+OFvlcUFJihIlG0d0F7gil7fB/v LaakD/xj1RY9g4Rhjd//NT99THDXxPnhX03UfM481bYymDOy4oaQOc4wvadwTu/pPPgP TvTJhJFLAFESFiAiFRZqMuQZc5h+ow8JUnLcE= Received: by 10.236.149.41 with SMTP id w29mr6651660yhj.361.1304887966114; Sun, 08 May 2011 13:52:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.147.182.5 with HTTP; Sun, 8 May 2011 13:52:06 -0700 (PDT) In-Reply-To: <32CD2BCD32154EF29904F03720801519@us.oracle.com> References: <6A3327809B8B440D99CDCDCED77E9575@us.oracle.com> <567CCE5B717E445496B4F685457F16AB@us.oracle.com> <32CD2BCD32154EF29904F03720801519@us.oracle.com> From: Juanma Barranquero Date: Sun, 8 May 2011 22:52:06 +0200 Message-ID: Subject: Re: bug#8638: 24.0.50; Imenu should not include vacuous defvars To: Drew Adams Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.3 (---) X-Debbugs-Envelope-To: 8638 Cc: 8638@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.3 (---) On Sun, May 8, 2011 at 22:39, Drew Adams wrote: > I understand. =C2=A0How would you feel if Imenu included entries for defu= ns and > defvars that are commented out? =C2=A0Wouldn't you want Imenu to judge th= at you are > not interested in those? Well, we're not talking about commented out variables, so the comparison isn't entirely fair. But, to be honest, sometimes I think that entries for commented out defuns and defvars would be useful... :-) > Certainly comments that include defuns and such could be important and > interesting to developers. =C2=A0The question is what Imenu should includ= e, and yes, > it is a judgment call based on expectations of what most users will want/= expect. Not users. Developers. And developers are usually interested in a package's variables. More so in a lexical-binding context, where the fact that the defvar exists can (and does) alter semantics. =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Sun May 08 17:49:29 2011 Received: (at 8638) by debbugs.gnu.org; 8 May 2011 21:49:29 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QJBqy-0001BS-Md for submit@debbugs.gnu.org; Sun, 08 May 2011 17:49:28 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QJBqx-0001BF-H1 for 8638@debbugs.gnu.org; Sun, 08 May 2011 17:49:27 -0400 Received: from rtcsinet21.oracle.com (rtcsinet21.oracle.com [66.248.204.29]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p48LnJnW026793 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 8 May 2011 21:49:21 GMT Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by rtcsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p48LnI7g011210 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 8 May 2011 21:49:19 GMT Received: from abhmt017.oracle.com (abhmt017.oracle.com [141.146.116.26]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p48LnD0C002022; Sun, 8 May 2011 16:49:13 -0500 Received: from dradamslap1 (/10.159.41.120) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 08 May 2011 14:49:12 -0700 From: "Drew Adams" To: "'Juanma Barranquero'" References: <6A3327809B8B440D99CDCDCED77E9575@us.oracle.com> <567CCE5B717E445496B4F685457F16AB@us.oracle.com> <32CD2BCD32154EF29904F03720801519@us.oracle.com> Subject: RE: bug#8638: 24.0.50; Imenu should not include vacuous defvars Date: Sun, 8 May 2011 14:49:04 -0700 Message-ID: <3361268F57984EC8826DCC27DE425C7D@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcwNwebds1gVaff5QZqCUjI2Gha/6gAB6I4Q X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090 X-Source-IP: rtcsinet21.oracle.com [66.248.204.29] X-CT-RefId: str=0001.0A090201.4DC70FE1.00E6:SCFSTAT5015188,ss=1,fgs=0 X-Spam-Score: -6.5 (------) X-Debbugs-Envelope-To: 8638 Cc: 8638@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.5 (------) > > it is a judgment call based on expectations of what most > > users will want/expect. > > Not users. Developers. And developers are usually interested in a > package's variables. More so in a lexical-binding context, where the > fact that the defvar exists can (and does) alter semantics. Users includes users who develop, and more. Imenu is for all Emacs users, including developers. And the question is not whether developers are interested in a package's variables. It is whether the Variables submenu should include entries for vacuous defvars. From debbugs-submit-bounces@debbugs.gnu.org Mon May 09 10:19:45 2011 Received: (at 8638) by debbugs.gnu.org; 9 May 2011 14:19:45 +0000 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 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 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 Received: by ceviche.home (Postfix, from userid 20848) id C0B8B666B3; Mon, 9 May 2011 11:19:34 -0300 (ART) From: Stefan Monnier To: Juanma Barranquero Subject: Re: bug#8638: 24.0.50; Imenu should not include vacuous defvars Message-ID: References: <6A3327809B8B440D99CDCDCED77E9575@us.oracle.com> Date: Mon, 09 May 2011 11:19:34 -0300 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) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 8638 Cc: 8638@debbugs.gnu.org, Drew Adams X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.0 (------) >> 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 From debbugs-submit-bounces@debbugs.gnu.org Mon May 09 10:31:59 2011 Received: (at 8638) by debbugs.gnu.org; 9 May 2011 14:31:59 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QJRV9-0000xy-1S for submit@debbugs.gnu.org; Mon, 09 May 2011 10:31:59 -0400 Received: from mail-gy0-f172.google.com ([209.85.160.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QJRV7-0000xl-Ne for 8638@debbugs.gnu.org; Mon, 09 May 2011 10:31:58 -0400 Received: by gyf3 with SMTP id 3so1854443gyf.3 for <8638@debbugs.gnu.org>; Mon, 09 May 2011 07:31:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=ir1Bm56e+Hv9tKOIeFEjEYdRRMPS4p5HvxfzT8cq3pE=; b=RwX1rm/ZSWgHbjxi9OgtvFqEdBk4Ytiy1mf6Fv6WRT8fUiEFPhBZs9LshwpYRBipa/ tpK3Yg592k58LwV0b8h25nLZkWOGXS0beTK3Pkz7vL2bWVRgJl892KlapjlJsYBLAfHK p6AYwtWCJHtBTb3fuxQsh/3a8J+vY1Gtozb+Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=Ok5VPSvaqXC5LsKCk0J4awaIoqNQTVi2TKf0F17ShjuFSWN81RIiedQmvCV7lA/3DW y1aB3ikDxvb4S/DgP83N5drBQOyL9sNL2WFR3M/XT8MMW8lWNQesl2QIP0jPAU9lV0Jl Mdz1XGusVhYhLHydrQK3UgijbRSTgPEs0cCCU= Received: by 10.236.193.100 with SMTP id j64mr8334400yhn.294.1304951512129; Mon, 09 May 2011 07:31:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.147.41.4 with HTTP; Mon, 9 May 2011 07:31:12 -0700 (PDT) In-Reply-To: References: <6A3327809B8B440D99CDCDCED77E9575@us.oracle.com> From: Juanma Barranquero Date: Mon, 9 May 2011 16:31:12 +0200 Message-ID: Subject: Re: bug#8638: 24.0.50; Imenu should not include vacuous defvars To: Stefan Monnier Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.3 (---) X-Debbugs-Envelope-To: 8638 Cc: 8638@debbugs.gnu.org, Drew Adams X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.3 (---) On Mon, May 9, 2011 at 16:19, Stefan Monnier wro= te: > So I'd tend to agree with Drew. =C2=A0For completion purposes, we'd want = to > pay attention to those defvars, but not for imenu. I had already conceded (Warnock style, interpretation #1 ;-) =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Fri May 27 12:00:30 2011 Received: (at 8638) by debbugs.gnu.org; 27 May 2011 16:00:30 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QPzSg-0001fS-As for submit@debbugs.gnu.org; Fri, 27 May 2011 12:00:30 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QPzSe-0001fG-TG for 8638@debbugs.gnu.org; Fri, 27 May 2011 12:00:29 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p4RG0KFr015239 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for <8638@debbugs.gnu.org>; Fri, 27 May 2011 16:00:22 GMT Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p4RG0JID024755 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for <8638@debbugs.gnu.org>; Fri, 27 May 2011 16:00:20 GMT Received: from abhmt005.oracle.com (abhmt005.oracle.com [141.146.116.14]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p4RG0EmU005587 for <8638@debbugs.gnu.org>; Fri, 27 May 2011 11:00:14 -0500 Received: from dradamslap1 (/10.159.51.66) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 27 May 2011 09:00:13 -0700 From: "Drew Adams" To: <8638@debbugs.gnu.org> References: <6A3327809B8B440D99CDCDCED77E9575@us.oracle.com> Subject: RE: bug#8638: 24.0.50; Imenu should not include vacuous defvars Date: Fri, 27 May 2011 09:00:13 -0700 Message-ID: <0D4329D43B42401498128F9B58880C74@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcwNsO5Hw8NEN83XTo2bQ0fSlUWB8wAAGx6gA7UKxMA= X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090 X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090201.4DDFCA96.012C:SCFMA922111,ss=1,fgs=0 X-Spam-Score: -6.5 (------) X-Debbugs-Envelope-To: 8638 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.5 (------) > 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. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 05 10:23:49 2012 Received: (at 8638) by debbugs.gnu.org; 5 Aug 2012 14:23:49 +0000 Received: from localhost ([127.0.0.1]:35518 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sy1kB-0003x8-2g for submit@debbugs.gnu.org; Sun, 05 Aug 2012 10:23:47 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:63891) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sy1k8-0003x0-FA for 8638@debbugs.gnu.org; Sun, 05 Aug 2012 10:23:45 -0400 Received: by pbbrr4 with SMTP id rr4so2459829pbb.3 for <8638@debbugs.gnu.org>; Sun, 05 Aug 2012 07:15:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=g+IxJIvCdziGObYNe2WIWx/7Y3+7ww7j0asVy0c/gBA=; b=eImVtaGjlmMhVJJogCkk1NFZvzoggciHLRuOVwy+M8PXoaQ6J5hf+7EqXbBg4rpB+u aQ2ZOUkppY8GjNfPl8Njx3p4ofPOfJP797WMR+H5nDruO/CPz6tk9nyKRX+BW+6E3GGo AGXauskWnStDOoGs5YlI1QT9hQS3pKhLjGn0uS+1KOWQXe+cYnMm4hN/bCMN8lzU5I9U fZoJoppcWQkLlfDKwYUqy/eWj3P3Bt6eO2J/cGWhv3MzH+/f6Qv3OGBzTDSobnwSSDv2 dfWBXKPkvMP501MrpjF0BB2ncQ9iMIWIagnWQbefCGItf5z9a02TLcyKqhB20RZvHsGG l87g== Received: by 10.68.195.197 with SMTP id ig5mr11896372pbc.137.1344176156433; Sun, 05 Aug 2012 07:15:56 -0700 (PDT) Received: from ulysses (cm162.gamma80.maxonline.com.sg. [202.156.80.162]) by mx.google.com with ESMTPS id nv6sm6934274pbc.42.2012.08.05.07.15.54 (version=SSLv3 cipher=OTHER); Sun, 05 Aug 2012 07:15:55 -0700 (PDT) From: Chong Yidong To: "Drew Adams" Subject: Re: bug#8638: 24.0.50; Imenu should not include vacuous defvars References: <6A3327809B8B440D99CDCDCED77E9575@us.oracle.com> <0D4329D43B42401498128F9B58880C74@us.oracle.com> Date: Sun, 05 Aug 2012 22:15:51 +0800 In-Reply-To: <0D4329D43B42401498128F9B58880C74@us.oracle.com> (Drew Adams's message of "Fri, 27 May 2011 09:00:13 -0700") Message-ID: <87mx295srs.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 8638 Cc: 8638@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) "Drew Adams" writes: > FWIW, I use this now. > Changed the whitespace match after var name. I committed a slightly different fix to trunk. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 05 10:23:58 2012 Received: (at control) by debbugs.gnu.org; 5 Aug 2012 14:23:58 +0000 Received: from localhost ([127.0.0.1]:35521 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sy1kM-0003xY-0k for submit@debbugs.gnu.org; Sun, 05 Aug 2012 10:23:58 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:63891) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sy1kK-0003x0-5N for control@debbugs.gnu.org; Sun, 05 Aug 2012 10:23:56 -0400 Received: by mail-pb0-f44.google.com with SMTP id rr4so2459829pbb.3 for ; Sun, 05 Aug 2012 07:16:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:mime-version:content-type; bh=JCxl2K0eOVOJoY+N2TI4Wx8kC7EKRO9Ge00FwNgtEWI=; b=HRcYAA+wJOYoWo3jqWEOzwe9iQPxi1pyrl3BfrOHgQgufYfkkSrzDrpFatov5wspKJ NHL6+wjt1ed9xjpdz73JYExSS5TeExSod1Kau8uLbVQzlrOHqwXz9QyLbWYWYoKjmXV7 pjoFfoU6VLKE7mqjSdeuXmrZ/6vumlFVTLenap3B5pgC0SCA+VzlWl4stXppaYPq33T6 vFViUKnCo7P9rBoPe2g8xlzoy0nfVNUMWwDtHnn/mmz8DWxCppYoxlUAhYbvI7Pl2wPJ zaSTArrRxVqO0F4clDBztbBMIxWlgpQlhRjlkboTsRwP/smEuxloQxJNJMwZelJwrbLn K9Vg== Received: by 10.68.191.72 with SMTP id gw8mr12075969pbc.143.1344176168492; Sun, 05 Aug 2012 07:16:08 -0700 (PDT) Received: from ulysses (cm162.gamma80.maxonline.com.sg. [202.156.80.162]) by mx.google.com with ESMTPS id pp2sm6945390pbb.1.2012.08.05.07.16.06 (version=SSLv3 cipher=OTHER); Sun, 05 Aug 2012 07:16:07 -0700 (PDT) From: Chong Yidong To: control@debbugs.gnu.org Subject: close 8638 Date: Sun, 05 Aug 2012 22:16:04 +0800 Message-ID: <87mx29zaor.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) close 8638 thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 05 12:35:27 2012 Received: (at 8638) by debbugs.gnu.org; 5 Aug 2012 16:35:27 +0000 Received: from localhost ([127.0.0.1]:35724 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sy3nb-0000AN-AO for submit@debbugs.gnu.org; Sun, 05 Aug 2012 12:35:27 -0400 Received: from acsinet15.oracle.com ([141.146.126.227]:51483) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sy3nZ-0000AE-DS for 8638@debbugs.gnu.org; Sun, 05 Aug 2012 12:35:26 -0400 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q75GRZ44027207 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 5 Aug 2012 16:27:36 GMT Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q75GRZ11013470 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 5 Aug 2012 16:27:35 GMT Received: from abhmt103.oracle.com (abhmt103.oracle.com [141.146.116.55]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q75GRYfT023490; Sun, 5 Aug 2012 11:27:34 -0500 Received: from dradamslap1 (/71.202.147.44) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 05 Aug 2012 09:27:34 -0700 From: "Drew Adams" To: "'Chong Yidong'" References: <6A3327809B8B440D99CDCDCED77E9575@us.oracle.com><0D4329D43B42401498128F9B58880C74@us.oracle.com> <87mx295srs.fsf@gnu.org> Subject: RE: bug#8638: 24.0.50; Imenu should not include vacuous defvars Date: Sun, 5 Aug 2012 09:27:22 -0700 Message-ID: <0AB1806162D94500957B6BEDDBE585AB@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87mx295srs.fsf@gnu.org> Thread-Index: Ac1zFNaRfpiIK/bHTQesausmdC7eNgAEePTg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 8638 Cc: 8638@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) > > FWIW, I use this now. > > Changed the whitespace match after var name. > > I committed a slightly different fix to trunk. Thanks. 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? Just wondering. Not that their use of a vacuous definition would mean the same thing, or even necessarily by correct syntax. But shouldn't a vacuous definition using one of those others also be ignored by Imenu? From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 05 23:51:14 2012 Received: (at 8638) by debbugs.gnu.org; 6 Aug 2012 03:51:14 +0000 Received: from localhost ([127.0.0.1]:36358 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SyELa-0006oR-BZ for submit@debbugs.gnu.org; Sun, 05 Aug 2012 23:51:14 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:50223) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SyELY-0006oJ-P7 for 8638@debbugs.gnu.org; Sun, 05 Aug 2012 23:51:13 -0400 Received: by pbbrr4 with SMTP id rr4so3278314pbb.3 for <8638@debbugs.gnu.org>; Sun, 05 Aug 2012 20:43:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=Lf72lSzy+P0mPN/LvzPo/1cLCe1yBe3EQ/qCuhP3VCw=; b=lJnW/6p/sZOuv1NmtNcEcw/AtkGqUikZ3hFuRS0QzCpeknW3SdGLf6BLYVcJ8sRfqC L1A2AsDgWa7tSGEP6OcNS7oGHsftdqE0DYqL6bgk8F6xV5vYBC+vMcAoOUwBCOUtt9u3 wyTKio8oK8jnmRitbi/NghWs3s6kERPzK7G9QTekXpijmg9UrxWAH7eBnHsPQl8FqphL qSAA9ltQOVKjGYG3ctWy7nL7azR/BDCr1V9k9xHMFIJrRx6w6nldkfNLBJKxGBtieTdS tTHoLeX3iSlElK2boNsigVc1EKQSbPguZFhOGdebZJmRAcWV1g3EZOuSJOlprwr68pmG p+8g== Received: by 10.68.231.10 with SMTP id tc10mr15636474pbc.107.1344224601699; Sun, 05 Aug 2012 20:43:21 -0700 (PDT) Received: from ulysses ([155.69.19.129]) by mx.google.com with ESMTPS id vd4sm4589989pbc.41.2012.08.05.20.43.18 (version=SSLv3 cipher=OTHER); Sun, 05 Aug 2012 20:43:20 -0700 (PDT) From: Chong Yidong To: "Drew Adams" Subject: Re: bug#8638: 24.0.50; Imenu should not include vacuous defvars References: <6A3327809B8B440D99CDCDCED77E9575@us.oracle.com> <0D4329D43B42401498128F9B58880C74@us.oracle.com> <87mx295srs.fsf@gnu.org> <0AB1806162D94500957B6BEDDBE585AB@us.oracle.com> Date: Mon, 06 Aug 2012 11:43:16 +0800 In-Reply-To: <0AB1806162D94500957B6BEDDBE585AB@us.oracle.com> (Drew Adams's message of "Sun, 5 Aug 2012 09:27:22 -0700") Message-ID: <87hasgr8h7.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 8638 Cc: 8638@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) "Drew Adams" writes: > 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. 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. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 06 00:00:31 2012 Received: (at 8638) by debbugs.gnu.org; 6 Aug 2012 04:00:31 +0000 Received: from localhost ([127.0.0.1]:36369 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SyEUY-00071f-JL for submit@debbugs.gnu.org; Mon, 06 Aug 2012 00:00:31 -0400 Received: from acsinet15.oracle.com ([141.146.126.227]:28159) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SyEUV-00071X-Rj for 8638@debbugs.gnu.org; Mon, 06 Aug 2012 00:00:28 -0400 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q763qYHQ003818 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 6 Aug 2012 03:52:35 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q763qYA3009124 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 6 Aug 2012 03:52:34 GMT Received: from abhmt113.oracle.com (abhmt113.oracle.com [141.146.116.65]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q763qWiI002866; Sun, 5 Aug 2012 22:52:33 -0500 Received: from dradamslap1 (/10.159.70.99) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 05 Aug 2012 20:52:32 -0700 From: "Drew Adams" To: "'Chong Yidong'" References: <6A3327809B8B440D99CDCDCED77E9575@us.oracle.com><0D4329D43B42401498128F9B58880C74@us.oracle.com><87mx295srs.fsf@gnu.org><0AB1806162D94500957B6BEDDBE585AB@us.oracle.com> <87hasgr8h7.fsf@gnu.org> Subject: RE: bug#8638: 24.0.50; Imenu should not include vacuous defvars Date: Sun, 5 Aug 2012 20:52:18 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87hasgr8h7.fsf@gnu.org> Thread-Index: Ac1zhaDY5BtmeYYxRNK3yurxS4o2kwAALUDw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 8638 Cc: 8638@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) > > 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. From unknown Tue Jun 17 20:40:03 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 03 Sep 2012 11:24:02 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator