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: defvar vs setqif.. Date: 19 May 2002 16:44:36 -0400 Sender: emacs-devel-admin@gnu.org Message-ID: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1021841110 28794 127.0.0.1 (19 May 2002 20:45:10 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 19 May 2002 20:45:10 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 179XYD-0007UJ-00 for ; Sun, 19 May 2002 22:45:09 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 179Xlq-0001gB-00 for ; Sun, 19 May 2002 22:59:14 +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 179XYI-0008Q0-00; Sun, 19 May 2002 16:45: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 179XXi-0008Js-00 for ; Sun, 19 May 2002 16:44:38 -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 QAA21963 for ; Sun, 19 May 2002 16:44:37 -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 QAA03988 for ; Sun, 19 May 2002 16:44:37 -0400 (EDT) Original-Received: (from deego@localhost) by poynting.umd.edu (8.9.3/8.9.3) id QAA04190; Sun, 19 May 2002 16:44:36 -0400 (EDT) X-Authentication-Warning: poynting.umd.edu: deego set sender to deego@glue.umd.edu using -f Original-To: emacs-devel@gnu.org Original-Lines: 27 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:4139 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:4139 One often finds multiple defvar's for a single variable in libraries and specially in .emacs .. This is because people use (defvar 'foo) at the top-level, when they mean to: (if (unboundp 'foo) (defvar foo)).. There's no difference but the former affects tags, find-function etc. etc. when it shouldn't... An example: my .emacs needs to, say, (add-hook 'foo-mode-hook... ), but the hook may not be defined, so i (defvar foo-mode-hook) before this statement. The problem is that this would lead to etags and find-function marking those places. If there was a special-form that did exactly what defvar does, hopefully people would stop using defvar when they didn't mean to... I would not like if this new special-form started with a 'def'.. because often it is convenient to ask etags to tag anything starting with 'def..' ... specially useful if you define your own defunn's and defun-my etc. So i was wondering is a special-form like 'setqif' could be provided whose only difference from 'defvar' is in a name... D --