all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
Cc: emacs-devel@gnu.org
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	[thread overview]
Message-ID: <E18mKxz-0005v0-00@fencepost.gnu.org> (raw)
In-Reply-To: <200302202026.h1KKQ7924606@rum.cs.yale.edu> (monnier+gnu/emacs@rum.cs.yale.edu)

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

  parent reply	other threads:[~2003-02-21 21:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-20 21:03 Can we add a check to see if user is using old or obsolete code? Kim F. Storm
2003-02-20 20:26 ` Stefan Monnier
2003-02-20 22:04   ` Kim F. Storm
2003-02-21 21:44   ` Richard Stallman [this message]
2003-02-21 23:20     ` Kim F. Storm
2003-02-22  0:28       ` Miles Bader
2003-02-22 22:37         ` Kim F. Storm
2003-02-22 17:54       ` Richard Stallman
2003-02-20 21:29 ` Kai Großjohann
2003-02-21  0:35   ` Kim F. Storm
2003-02-21 16:41     ` Kai Großjohann
2003-02-22  8:15   ` Richard Stallman
2003-02-23 11:06     ` Kai Großjohann
2003-02-24 16:38       ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E18mKxz-0005v0-00@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.