X-Git-Url: https://zdv2.bktei.com/gitweb/BK-2020-03.git/blobdiff_plain/5c82aee693673105f510f78139f633cfca037758..2d5bc059f7234f883ced2e231185e665d954c5ec:/unitproc/elisp/my-reverse-region.el diff --git a/unitproc/elisp/my-reverse-region.el b/unitproc/elisp/my-reverse-region.el new file mode 100644 index 0000000..ebe6f20 --- /dev/null +++ b/unitproc/elisp/my-reverse-region.el @@ -0,0 +1,7 @@ +;; 2020-11-17T02:13Z; bktei> Function to reverse region of text +(defun my-reverse-region (beg end) + "Reverse characters between BEG and END." + (interactive "r") + (let ((region (buffer-substring beg end))) + (delete-region beg end) + (insert (nreverse region))))