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

    Allow specifying SPACING with pref arg in align-regexp
---
 isl.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/isl.el b/isl.el
index 9406c9f73df..039e67e7257 100644
--- a/isl.el
+++ b/isl.el
@@ -745,9 +745,10 @@ Arguments OCCURRENCE-REGEXP, BEG and END have same meaning 
as in
     (overlay-put ol 'isl-invisible t)
     (overlay-put ol 'invisible 'isl-invisible)))
 
-(defun isl-align-regexp ()
-  "Align text matching regexp in current-buffer."
-  (interactive)
+(defun isl-align-regexp (arg)
+  "Align text matching regexp in current-buffer.
+Numeric prefix ARG is applied to the SPACING arg of `align-regexp'."
+  (interactive "p")
   (cl-assert isl--narrow-to-region nil "No region found")
   (with-current-buffer isl-current-buffer
     (align-regexp isl--point-min isl--point-max
@@ -755,7 +756,7 @@ Arguments OCCURRENCE-REGEXP, BEG and END have same meaning 
as in
                           (if (equal (isl-matching-style) "Regex")
                               isl-pattern
                             (regexp-quote isl-pattern)))
-                  1)
+                  1 arg)
     ;; Align-regexp has probably added or removed spaces so update
     ;; isl--point-min/max.
     (setq isl--point-min (point-min)

Reply via email to