From c38c3a4c67d8b108de8951a395d3faf8bef7b733 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Thu, 31 Oct 2024 19:01:06 +0100 Subject: emacs: Check if ‘mc/num-cursors’ is bound MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/emacs/editing.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.config/emacs/editing.el') diff --git a/.config/emacs/editing.el b/.config/emacs/editing.el index 95160f8..66a5953 100644 --- a/.config/emacs/editing.el +++ b/.config/emacs/editing.el @@ -198,7 +198,8 @@ each cursor (effectively calling `e/mc/sort-regions'. When called with a prefix argument REVERSE, sorting occurs in reverse order." (interactive "*P") - (if (< 1 (mc/num-cursors)) + (if (and (fboundp #'mc/num-cursors) + (< 1 (mc/num-cursors))) (e/mc/sort-regions reverse) (sort-lines reverse (region-beginning) (region-end)))) -- cgit v1.2.3