From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Phillip Lord Newsgroups: gmane.emacs.help Subject: Re: Using custom as a type checker:- ramble Date: 27 Mar 2003 10:25:50 +0000 Organization: BIOSCI/MRC Human Genome Mapping Project Resource Centre Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <5ld6ke9k6c.fsf@rum.cs.yale.edu> <5l4r5q9bzx.fsf@rum.cs.yale.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1048761173 12220 80.91.224.249 (27 Mar 2003 10:32:53 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 27 Mar 2003 10:32:53 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Thu Mar 27 11:32:51 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18yUgl-0003Ao-00 for ; Thu, 27 Mar 2003 11:32:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18yUei-0007eC-03 for gnu-help-gnu-emacs@m.gmane.org; Thu, 27 Mar 2003 05:30:44 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.esat.net!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!server1.netnews.ja.net!hgmp.mrc.ac.uk!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 40 Original-NNTP-Posting-Host: bromine.hgmp.mrc.ac.uk Original-X-Trace: niobium.hgmp.mrc.ac.uk 1048760750 22702 193.62.192.35 (27 Mar 2003 10:25:50 GMT) Original-X-Complaints-To: news@net.bio.net Original-NNTP-Posting-Date: Thu, 27 Mar 2003 10:25:50 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.93 Original-Xref: shelby.stanford.edu gnu.emacs.help:111447 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:7947 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:7947 >>>>> "Stefan" == Stefan Monnier writes: >> > I.e. I don't want to change the .emacs code at all, but I'd >> > like >> >to have a more-or-less generic way to add helpful analysis of >> >the code so as to give useful information to the user about >> >suspicious customizations. >> Well I would agree that this would be preferable. Stefan> It should be possible to get the desired result without Stefan> implementing an elisp interpreter in elisp, but instead by Stefan> temporarily rebinding `setq' as a macro (and things like Stefan> that). I think that would be fairly hard! setq is such a basic function, and to change it so that it worked correctly, but still failed at the appropriate time. I presume you are still suggesting using the type information in custom to make the determination as to whether an .emacs setq was "type safe" or not? If this is the case, it would seem the two approaches (a custom-setq, or augmented setq) would use a lot of common code. Stefan> Another alternative is to put the checking into the Stefan> byte-compiler (which already takes care of traversing elisp Stefan> code) and then byte-compile the .emacs file (not for speed Stefan> but for sanity checks). This might be the best option. That also sounds plausible, if somewhat beyond my elisp coding skills. Cheers Phil