emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can we add a check to see if user is using old or obsolete code?


From: Richard Stallman
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

    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.)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]