Emacs: rotate 13 cipher 💠

By Xah Lee. Date: .

put this in your Emacs Init File:

(defun xah-rot13 ()
  "Call `rot13-region' on current word or selection.

URL `http://xahlee.info/emacs/misc/rot13.html'
Created: 2025-03-15
Version: 2025-03-15"
  (interactive)
  (let (xbeg xend)
    (seq-setq
     (xbeg xend)
     (if (region-active-p)
         (vector (region-beginning) (region-end))
       (let ((xbounds (bounds-of-thing-at-point 'symbol)))
         (vector (car xbounds) (cdr xbounds)))))
    (rot13-region xbeg xend)))