On 2011-04-05 09:45 +0200, Timo Juhani Lindfors wrote:

> Sven Joachim <svenj...@gmx.de> writes:
>> I think that dropping support for emacs-snapshot and future Emacs
>> versions like emacs24 is rather unfortunate.  How about
>>
>> (if (and (>= emacs-major-version 23)
>>       (not (featurep 'xemacs)))
>>
>> instead, to support emacs23 _and later_?
>
> Thanks for the feedback, much appreciated. The above comparison works
> for magit.emacsen-startup but magit.emacsen-install is a shell script
> that can't do such a comparison (same goes for debian/control).
>
> Would adding emacs24 and emacs-snapshot to the lists in
>
> ./debian/magit.emacsen-startup
> ./debian/magit.emacsen-install
> ./debian/control
>
> be sufficient? I'm quite sure we can update the packaging before emacs25
> is released...

Another approach would be to blacklist xemacs* and emacsen older than
emacs23 in magit.emacsen-startup, and assume that other flavors work.
As for debian/control, you can prefer the emacs metapackage as first
alternative so that magit is automatically usable with the latest and
greatest Emacs flavor.

What do you think of the attached patch (not actually tested with
xemacs21 or old emacsen flavors) ?

Cheers,
       Sven

>From 88cf82053f8e7163bdf7070b5b1cf0be53433e72 Mon Sep 17 00:00:00 2001
From: Sven Joachim <svenj...@gmx.de>
Date: Tue, 5 Apr 2011 10:56:15 +0200
Subject: [PATCH] Re-add support for emacsen newer than emacs23

---
 debian/changelog             |    2 +-
 debian/control               |    2 +-
 debian/magit.emacsen-install |    8 ++++----
 debian/magit.emacsen-startup |    3 ++-
 4 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index d6de34c..5817897 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,7 @@
 magit (1.0.0-1~try5) unstable; urgency=low
 
   * New upstream release.
-  * Drop support for emacsen other than emacs23
+  * Drop support for xemacs and emacsen older than emacs23
     (closes: #619480).
 
  -- Timo Juhani Lindfors <timo.lindf...@iki.fi>  Mon, 28 Mar 2011 14:38:31 
-0400
diff --git a/debian/control b/debian/control
index a40f59a..1092093 100644
--- a/debian/control
+++ b/debian/control
@@ -11,7 +11,7 @@ Vcs-Git: git://git.debian.org/collab-maint/magit.git
 
 Package: magit
 Architecture: all
-Depends: ${misc:Depends}, emacs23, git-core, dpkg (>= 1.15.4) | install-info
+Depends: ${misc:Depends}, emacs (>= 23) | emacs23 | emacs-snapshot, git-core, 
dpkg (>= 1.15.4) | install-info
 Description: An Emacs interface for Git
  With Magit, you can inspect and modify your Git repositories with
  Emacs.  You can review and commit the changes you have made to the
diff --git a/debian/magit.emacsen-install b/debian/magit.emacsen-install
index 3c8a7a7..430bc7e 100644
--- a/debian/magit.emacsen-install
+++ b/debian/magit.emacsen-install
@@ -12,8 +12,11 @@ elc_dir=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}/
 
 case "${FLAVOR}" in
     emacs)
+       ;;
+    emacs19|emacs2[012]|xemacs*)
+        echo install/${PACKAGE}: Ignoring unsupported flavor ${FLAVOR}
         ;;
-    emacs23)
+    *)
         echo install/${PACKAGE}: Handling install of emacsen flavor ${FLAVOR}
         [ -d ${elc_dir} ] || mkdir ${elc_dir}
 
@@ -33,9 +36,6 @@ case "${FLAVOR}" in
         fi
         rm ${LOG}
         ;;
-    *)
-        echo install/${PACKAGE}: Ignoring unsupported flavor ${FLAVOR}
-        ;;
 esac
 
 exit 0;
diff --git a/debian/magit.emacsen-startup b/debian/magit.emacsen-startup
index 159d841..1aba0a0 100644
--- a/debian/magit.emacsen-startup
+++ b/debian/magit.emacsen-startup
@@ -1,6 +1,7 @@
 ;;; Autoloads for magit
 
-(if (member debian-emacs-flavor '(emacs23))
+(if (and (>= emacs-major-version 23)
+        (not (featurep 'xemacs)))
     (if (file-exists-p "/usr/share/emacs/site-lisp/magit/magit.el")
         (autoload 'magit-status "magit" nil t)
       (message "Package magit removed but not purged. Skipping setup.")))
-- 
1.7.4.1

Reply via email to