From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "D. Goel" Newsgroups: gmane.emacs.devel Subject: Re: defvar vs setqif.. Date: 20 May 2002 15:00:02 -0400 Sender: emacs-devel-admin@gnu.org Message-ID: References: <87hel3sn2d.fsf@tc-1-100.kawasaki.gol.ne.jp> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1021921378 14016 127.0.0.1 (20 May 2002 19:02:58 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 20 May 2002 19:02:58 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 179sQr-0003dx-00 for ; Mon, 20 May 2002 21:02:57 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 179sew-0006PR-00 for ; Mon, 20 May 2002 21:17:30 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 179sR8-0001us-00; Mon, 20 May 2002 15:03:14 -0400 Original-Received: from ipr-mail.umd.edu ([128.8.86.132]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 179sO5-0001lw-00; Mon, 20 May 2002 15:00:05 -0400 Original-Received: from poynting.umd.edu (root@poynting.umd.edu [128.8.86.100]) by ipr-mail.umd.edu (8.9.3/8.9.3) with ESMTP id PAA02077; Mon, 20 May 2002 15:00:04 -0400 (EDT) Original-Received: from poynting.umd.edu (sendmail@localhost [127.0.0.1]) by poynting.umd.edu (8.9.3/8.9.3) with SMTP id PAA05019; Mon, 20 May 2002 15:00:03 -0400 (EDT) Original-Received: (from deego@localhost) by poynting.umd.edu (8.9.3/8.9.3) id PAA08003; Mon, 20 May 2002 15:00:03 -0400 (EDT) X-Authentication-Warning: poynting.umd.edu: deego set sender to deego@glue.umd.edu using -f Original-To: Miles Bader In-Reply-To: <87hel3sn2d.fsf@tc-1-100.kawasaki.gol.ne.jp> Original-Lines: 44 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:4196 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:4196 > > If there was a special-form that did exactly what defvar does, hopefully > > people would stop using defvar when they didn't mean to... > > The way they're using defvar is correct. yeah, true. i didn't mean to suggest otherwise. i just mean that defvar > > It would be much better to fix the definition-finding functions to > prefer defvars that initialize the variable over those that don't, since > the `real' definition almost always initializes the value (and should). how can a definition-finding function tell which of the several defvar's it may encounter. AFAICT, there is no way for a definition-finding function like tag-creation-function to tell which is the 'defining' defvar and which is not... > > > So i was wondering is a special-form like 'setqif' could be > > provided whose only difference from 'defvar' is in a name... > > That name would be wrong, because the usage of defvar you're > complaining about doesn't set the variable at all. but that's why i had an 'if' at the end.. to suggest that setq only if not already defined.. else don't setq.. > > In any case, we should just make defvar work correctly. mean? in any case, all this is a very 'cosmetic' issue.. no big deal if folks didn't like the idea :) Have a good day, D --