unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm@gnu.org>
To: rms@gnu.org
Cc: emacs-devel@gnu.org
Subject: Re: Recognizing obsolete external package versions
Date: Fri, 10 Aug 2007 17:15:11 -0400	[thread overview]
Message-ID: <tejibt7kw.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <E1IFyEg-0001o5-Ox@fencepost.gnu.org> (Richard Stallman's message of "Tue, 31 Jul 2007 16:22:30 -0400")

Richard Stallman wrote:

> Would someone please implement that feature?

Will this do?


(defconst bad-packages-list
  '((semantic (string-equal semantic-version "2.0pre3")
              (format "Semantic 2.0pre3 won't run in Emacs %s.
It causes excessive CPU load.  Update to a newer version."
                      emacs-major-version))
    ;; Install run-time check for older versions of CUA-mode, which
    ;; does not work with GNU Emacs version 22.1 and newer.
    ;;
    ;; Except for version 1.2, all of the 1.x and 2.x version of cua-mode
    ;; provided the `CUA-mode' feature.  Since this is no longer true,
    ;; we can warn the user if the `CUA-mode' feature is ever provided.
    (CUA-mode t (format "\n\nCUA-mode is now part of the standard \
GNU Emacs distribution, so you may
now enable CUA via the Options menu or by customizing option `cua-mode'.\n
You have loaded an older version of CUA-mode which does
not work correctly with this version of GNU Emacs.\n\n%s"
                        (if user-init-file
                            (format "To correct this, remove the loading and \
customization of the
old version from the %s file.\n\n" user-init-file)
                          ""))))
  "List of packages known to cause problems in this version of Emacs.
Each element has the form (PACKAGE TESTFUNC MSGFUNC).  Upon
loading PACKAGE, evaluate TESTFUNC, and if it returns non-nil
signal an error with message given by evaluating MSGFUNC.")

(defun bad-package-check (package)
  "Run a check using an element from `bad-packages-list'.
Use the element matching the symbol PACKAGE.  This function is
added to `after-load-alist'."
  (let ((list (assoc package bad-packages-list)))
    (and list
         (condition-case nil
             (eval (nth 1 list))
           (error nil))
         (error (eval (nth 2 list))))))

(mapc (lambda (elem)
        (eval-after-load (car elem) `(bad-package-check ',(car elem))))
      bad-packages-list)

  reply	other threads:[~2007-08-10 21:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-31 20:22 Recognizing obsolete external package versions Richard Stallman
2007-08-10 21:15 ` Glenn Morris [this message]
2007-08-10 21:25   ` Lennart Borgman (gmail)
2007-08-10 22:18     ` Glenn Morris
2007-08-11  0:24       ` Glenn Morris
2007-08-12  4:15   ` Richard Stallman
2007-08-12  4:50     ` Stefan Monnier
2007-08-13  0:51       ` Richard Stallman
2007-08-13  1:54         ` Stefan Monnier
2007-08-14  0:28           ` Richard Stallman
2007-08-14  7:52             ` Glenn Morris
2007-08-13  7:31     ` Glenn Morris
2007-08-14  0:28       ` Richard Stallman
2007-08-13  9:56     ` Kim F. Storm
2007-08-14  0:28       ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2007-08-08  4:54 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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=tejibt7kw.fsf@fencepost.gnu.org \
    --to=rgm@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rms@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).