From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.help Subject: Re: Using custom as a type checker:- ramble Date: 26 Mar 2003 14:14:10 -0500 Organization: Yale University Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <5l4r5q9bzx.fsf@rum.cs.yale.edu> References: <5ld6ke9k6c.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 1048706599 24956 80.91.224.249 (26 Mar 2003 19:23:19 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 26 Mar 2003 19:23:19 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 26 20:23:18 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 18yGTL-0006Qt-00 for ; Wed, 26 Mar 2003 20:22:03 +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 18yGNM-00050T-05 for gnu-help-gnu-emacs@m.gmane.org; Wed, 26 Mar 2003 14:15:52 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!news.ycc.yale.edu!rum.cs.yale.edu!rum.cs.yale.edu Original-Newsgroups: gnu.emacs.help Original-Lines: 28 Original-NNTP-Posting-Host: rum.cs.yale.edu User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-Original-NNTP-Posting-Host: rum.cs.yale.edu X-Original-Trace: 26 Mar 2003 14:14:10 -0500, rum.cs.yale.edu Original-Xref: shelby.stanford.edu gnu.emacs.help:111433 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:7932 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:7932 > > What I would much rather have is a way to load a normal > > .emacs and automatically have all the `setq's checked as > > above. The checking could also include obsolescence and > > things like that. > > > 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. > What worries me, though, is the complexity of this task. I don't know > about you, but my .emacs (and other files that I call from .emacs) is > huge, and often complex, so interpreting this would be complex. Adding > a "custom-setq" function would potentially be very simple. It should be possible to get the desired result without implementing an elisp interpreter in elisp, but instead by temporarily rebinding `setq' as a macro (and things like that). Another alternative is to put the checking into the byte-compiler (which already takes care of traversing elisp code) and then byte-compile the .emacs file (not for speed but for sanity checks). This might be the best option. Stefan