pjb-transpose: added rotate-rectangle.

Pascal J. Bourguignon [2021-10-05 13:34]
pjb-transpose: added rotate-rectangle.
Filename
pjb-transpose.el
diff --git a/pjb-transpose.el b/pjb-transpose.el
index db81413..db78489 100644
--- a/pjb-transpose.el
+++ b/pjb-transpose.el
@@ -106,5 +106,12 @@
     (goto-char (point))
     (activate-mark)))

+(defun rotate-rectangle (start end)
+  (interactive "r")
+  (goto-char (min start end))
+  (picture-insert-rectangle
+   (map 'list (lambda (line) (coerce line 'string))
+        (rotate (rotate (rotate (coerce (picture-snarf-rectangle start end)
+                                        'vector)))))))

 ;;;; THE END ;;;;
ViewGit