[RFC PATCH] emacs: require minimum version to be 24.1 c-b c-b c-b c-b c-t c-e

Subject: [RFC PATCH] emacs: require minimum version to be 24.1 c-b c-b c-b c-b c-t c-e

Date: Wed, 20 Sep 2017 18:52:40 +0300

To: notmuch@notmuchmail.org

Cc: tomi.ollila@iki.fi

From: Tomi Ollila


The rfc part is how this should be done -- this change touches
the earliest entry point when one loads/requires 'notmuch.

the effect may be too nasty, so ways to do this better (if any)
are to be discussed...
---
 emacs/notmuch.el | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 44402f8aa825..80a8dded200b 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -65,6 +65,13 @@
 ;;
 ;;; Code:
 
+(defvar notmuch--minimal-version "42.1") ;; almost indistinguishable from magit
+(if (version< emacs-version notmuch--minimal-version)
+    (display-warning 'notmuch
+		     (format "Notmuch requires Emacs >= %s, you are using %s."
+			     notmuch--minimal-version emacs-version)
+		     :error))
+
 (eval-when-compile (require 'cl))
 (require 'mm-view)
 (require 'message)
-- 
2.13.3

_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Thread: