branch: elpa/vm
commit 33337f66268377b5b82029faf841ade7a7e94bbd
Merge: 250c526ade e50ee4c2cc
Author: Mark Diekhans <ma...@ucsc.edu>
Commit: Mark Diekhans <ma...@ucsc.edu>

    Merge branch 'main' into 'main'
    
    generate an error if emacs is less than version 28 rather end up with 
confusing errors (fixes #509)
    
    Closes #509
    
    See merge request emacs-vm/vm!47
---
 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