branch: elpa/vm
commit e50ee4c2ccca6ce0995ec955487bfd2d16059dab
Author: Mark Diekhans <ma...@ucsc.edu>
Commit: Mark Diekhans <ma...@ucsc.edu>

    generate an error if emacs is less than version 28 rather end up with 
confusing errors (fixes #509)
---
 lisp/vm.el | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lisp/vm.el b/lisp/vm.el
index 293eeffed2..b720519aa1 100644
--- a/lisp/vm.el
+++ b/lisp/vm.el
@@ -34,6 +34,7 @@
 
 (provide 'vm)
 
+
 (require 'vm-macro)
 (require 'vm-misc)
 (require 'vm-folder)
@@ -57,6 +58,9 @@
 (eval-when-compile (require 'cl-lib))
 (require 'package)
 
+(defconst vm-min-emacs-version 28
+  "Minimum required Emacs major version supported by VM.")
+
 (defvar enable-multibyte-characters)
 
 ;; vm-xemacs.el is a non-existent file to fool the Emacs 23 compiler
@@ -68,6 +72,11 @@
 (declare-function vm-summary-faces-mode "vm-summary-faces.el" 
                  (&optional arg))
 
+;; Don't get any farther if emacs is too old
+(when (< emacs-major-version vm-min-emacs-version)
+  (error "VM requires Emacs %d or later" vm-min-emacs-version))
+
+
 ;; Ensure that vm-autoloads is loaded in case the user is using VM 7.x
 ;; autoloads 
 

Reply via email to