From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: void variable Date: Thu, 19 Aug 2004 20:27:51 -0500 (CDT) Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: <200408200127.i7K1Rpi00213@raven.dms.auburn.edu> References: <410353ED.1090107@math.ku.dk> <4104091E.4040007@math.ku.dk> <200407252046.i6PKkFH29813@raven.dms.auburn.edu> <200407262041.i6QKfFu15523@raven.dms.auburn.edu> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1092965342 1346 80.91.224.253 (20 Aug 2004 01:29:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 20 Aug 2004 01:29:02 +0000 (UTC) Cc: larsh@math.ku.dk, rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 20 03:28:52 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BxyD5-0004al-00 for ; Fri, 20 Aug 2004 03:28:52 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BxyHN-0003Io-FC for ged-emacs-devel@m.gmane.org; Thu, 19 Aug 2004 21:33:17 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BxyHE-0003Ij-4A for emacs-devel@gnu.org; Thu, 19 Aug 2004 21:33:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BxyHD-0003IT-Ad for emacs-devel@gnu.org; Thu, 19 Aug 2004 21:33:07 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BxyHD-0003IJ-2Z for emacs-devel@gnu.org; Thu, 19 Aug 2004 21:33:07 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BxyCY-0006KE-NF; Thu, 19 Aug 2004 21:28:18 -0400 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id i7K1SBuE008589; Thu, 19 Aug 2004 20:28:12 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.6+Sun/8.11.6) id i7K1Rpi00213; Thu, 19 Aug 2004 20:27:51 -0500 (CDT) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: monnier@iro.umontreal.ca In-reply-to: (message from Stefan Monnier on 19 Aug 2004 15:33:53 -0400) 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: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:26335 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:26335 Stefan Monnier wrote: The patch below seems to work well. Any objection (or suggestion of a better message)? Of course, `defcustom' has exactly the same problem as `defvar'. So doing this for defvar and not defcustom seems inconsistent. Strictly speaking, `defconst' also has the same problem, but let-binding a variable defined with defconst seems very iffy in any circumstances. The message: VAR is still globally unbound looks cryptic. It makes it seem that there is something wrong with let-binding a variable that is globally unbound whereas, of course, that happens all the time. Davis Herring wrote: "Can't bind `foo-bar' globally: `let' around `defvar'" I would prefer: "Warning: defvar for locally bound `%s' failed to globally define it." and: "Warning: defcustom for locally bound `%s' failed to globally define it." For one thing, local bindings are not always made with `let'. Anyway, somebody with a reasonably fast machine may only see this when studying the *Messages* buffer. It easily can be overwritten by messages like: Loading ~/foo.el ...done Sincerely, Luc.