From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: Qs on free variable occurrences Date: Mon, 1 May 2006 14:25:50 -0700 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1146518781 18788 80.91.229.2 (1 May 2006 21:26:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 1 May 2006 21:26:21 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 01 23:26:19 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FafuG-0002Kb-7U for ged-emacs-devel@m.gmane.org; Mon, 01 May 2006 23:26:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FafuF-00049B-M3 for ged-emacs-devel@m.gmane.org; Mon, 01 May 2006 17:26:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fafu2-00048C-E4 for emacs-devel@gnu.org; Mon, 01 May 2006 17:25:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Faftz-00044z-F8 for emacs-devel@gnu.org; Mon, 01 May 2006 17:25:58 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Faftz-00044a-9B for emacs-devel@gnu.org; Mon, 01 May 2006 17:25:55 -0400 Original-Received: from [148.87.113.118] (helo=rgminet01.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.52) id 1Faftz-0005HY-PF for emacs-devel@gnu.org; Mon, 01 May 2006 17:25:56 -0400 Original-Received: from rgmsgw300.us.oracle.com (rgmsgw300.us.oracle.com [138.1.186.49]) by rgminet01.oracle.com (Switch-3.1.6/Switch-3.1.6) with ESMTP id k41LPqRk014515 for ; Mon, 1 May 2006 15:25:52 -0600 Original-Received: from dradamslap (dradams-lap.us.oracle.com [130.35.177.126]) by rgmsgw300.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with SMTP id k41LPpTn006048 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Mon, 1 May 2006 15:25:52 -0600 Original-To: "Emacs-Devel" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:53747 Archived-At: Consider variable `minibuffer-history-position', in library simple.el. 1. It is bound (`let') in function `repeat-complex-command'. 2. It is assigned a value at the top level of the file. 3. It is both used (evaluated) and assigned a value in functions `previous-matching-history-element' and `next-history-element'. 4. Byte-compiling the file gives no warning of the variable being used as a free variable (in #3 and #4). This is not a criticism, but a couple of questions. a. Why #4? Is it because the byte-compiler cannot detect these as free occurrences of the variable or is it intentional (TRT)? If the latter, what's the rationale? b. Is this coding style considered good or bad? In particular, should `minibuffer-history-position' be declared a global variable by giving it a defvar? Just trying to learn. Supporting reasons would help me understand. Thx.