branch: elpa/isl
commit 439819d7e70bf5e42a29a708dc7b90db0f11ab27
Author: Thierry Volpiatto <[email protected]>
Commit: Thierry Volpiatto <[email protected]>

    Add assertion to prevent aligning with a mm pattern
---
 isl.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/isl.el b/isl.el
index 039e67e7257..b38c075ccc0 100644
--- a/isl.el
+++ b/isl.el
@@ -750,6 +750,8 @@ Arguments OCCURRENCE-REGEXP, BEG and END have same meaning 
as in
 Numeric prefix ARG is applied to the SPACING arg of `align-regexp'."
   (interactive "p")
   (cl-assert isl--narrow-to-region nil "No region found")
+  (cl-assert (not (cdr (isl-split-string isl-pattern))) nil
+             "Can't align with a multi match expression")
   (with-current-buffer isl-current-buffer
     (align-regexp isl--point-min isl--point-max
                   (concat "\\(\\s-+\\)"

Reply via email to