From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Recognizing obsolete external package versions Date: Mon, 13 Aug 2007 11:56:53 +0200 Message-ID: <87y7gfwye2.fsf@kfs-lx.testafd.dk> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1186995513 18677 80.91.229.12 (13 Aug 2007 08:58:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 13 Aug 2007 08:58:33 +0000 (UTC) Cc: Glenn Morris , emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 13 10:58:30 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IKVkr-0005lf-P1 for ged-emacs-devel@m.gmane.org; Mon, 13 Aug 2007 10:58:30 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IKVkr-0006ua-2N for ged-emacs-devel@m.gmane.org; Mon, 13 Aug 2007 04:58:29 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IKVjV-0006gc-O1 for emacs-devel@gnu.org; Mon, 13 Aug 2007 04:57:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IKVjS-0006gE-Az for emacs-devel@gnu.org; Mon, 13 Aug 2007 04:57:04 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IKVjS-0006gB-7I for emacs-devel@gnu.org; Mon, 13 Aug 2007 04:57:02 -0400 Original-Received: from mail-relay.sonofon.dk ([212.88.64.25]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1IKVjR-0003I4-8k for emacs-devel@gnu.org; Mon, 13 Aug 2007 04:57:01 -0400 Original-Received: (qmail 61766 invoked from network); 13 Aug 2007 08:56:51 -0000 Original-Received: from unknown (HELO kfs-lx.testafd.dk.cua.dk) (213.83.150.2) by 0 with SMTP; 13 Aug 2007 08:56:51 -0000 In-Reply-To: (Richard Stallman's message of "Sun\, 12 Aug 2007 00\:15\:23 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Detected-Kernel: FreeBSD 4.6-4.9 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: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:76440 Archived-At: Richard Stallman writes: > That code seems basically right > except that I would rather it avoid calling eval. > It should give the name of a variable, and the values that are bad. > IIRC, we discurage inclusion of version strings in packages. And even if there is a version string, there is no guarangee that the version string is stored in a variable. > I think it would be better to check at the beginning of loading the file > rather than at the end. That is possible by searching for "(defvar VARIABLE", > evaluating the sexp that comes next, and looking at its value. For the CUA-mode check, there is no such version variable ... instead, it is simply the presence of the `CUA-mode' feature which triggers the warning. I could also imagine that for some packages, checking for an old version need to e.g. check for the (non-)presense of some function or variable. > > That would require detecting the file by its name rather than by > a feature it provides. What method would you use to trigger the checking _before_ the load (even before reading the file)? AFAICS, we only have eval-after-load to play with here. -- Kim F. Storm http://www.cua.dk