From 457b7cab1e2836609408238df64c73ef38c1dc91 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 5 Apr 2025 01:59:45 -0400 Subject: [PATCH] docs(undo): doctor: check for other undo package If the user has installed one package while :emacs undo installs the other, they're gonna have a bad time. --- modules/emacs/undo/doctor.el | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 modules/emacs/undo/doctor.el diff --git a/modules/emacs/undo/doctor.el b/modules/emacs/undo/doctor.el new file mode 100644 index 000000000..d1fda36f4 --- /dev/null +++ b/modules/emacs/undo/doctor.el @@ -0,0 +1,7 @@ +;;; emacs/undo/doctor.el -*- lexical-binding: t; -*- + +(let* ((unwanted (if (modulep! +tree) 'undo-fu 'undo-tree)) + (wanted (if (modulep! +tree) 'undo-tree 'undo-fu))) + (when (doom-package-in-module-p unwanted :user) + (error! "User has installed %S, which is incompatible with %S" unwanted wanted) + (explain! "Set (or unset) this module's +tree flag to set up one or the other.")))