From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Can we add a check to see if user is using old or obsolete code? Date: Fri, 21 Feb 2003 16:44:23 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <5xfzqibr72.fsf@kfs2.cua.dk> <200302202026.h1KKQ7924606@rum.cs.yale.edu> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1045863935 7536 80.91.224.249 (21 Feb 2003 21:45:35 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 21 Feb 2003 21:45:35 +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.35 #1 (Debian)) id 18mKz8-0001xO-00 for ; Fri, 21 Feb 2003 22:45:34 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18mLDJ-0001q9-00 for ; Fri, 21 Feb 2003 23:00:13 +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 18mKyc-0007Hw-05 for emacs-devel@quimby.gnus.org; Fri, 21 Feb 2003 16:45:02 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18mKyD-0007Dr-00 for emacs-devel@gnu.org; Fri, 21 Feb 2003 16:44:37 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18mKyC-0007CZ-00 for emacs-devel@gnu.org; Fri, 21 Feb 2003 16:44:36 -0500 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18mKy0-0007AK-00 for emacs-devel@gnu.org; Fri, 21 Feb 2003 16:44:24 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.10) id 18mKxz-0005v0-00; Fri, 21 Feb 2003 16:44:23 -0500 Original-To: "Stefan Monnier" In-reply-to: <200302202026.h1KKQ7924606@rum.cs.yale.edu> (monnier+gnu/emacs@rum.cs.yale.edu) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:11823 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:11823 You can also use (eval-after-load 'cua '(if (boundp 'CUA-some-obsolete-var) (error "You are using an obsolete version of CUA."))) Does this assume that the old version of cua has some variable that has been removed? It looks that way. Perhaps in the case of cua this is true; perhaps some variable was removed from cua. But if we want this to be a general method, it should not depend on there being a variable or function that was removed. If there was no other reason to remove one, it would not be good to remove one just to do this. It would be better to do (eval-after-load 'cua '(unless (fboundp 'CUA-some-new-func) (error "You are using an obsolete version of CUA"))) You can always add a new function in the new version, and if you do so merely so that you can add this error message, that is not a problem. (Remember that error messages should not end with periods.)