-(defun mule-caesar-string (string &optional stride-ascii)
- "Caesar rotation of STRING, and return the result.
-Optional argument STRIDE-ASCII is rotation-size for Latin alphabet
-\(A-Z and a-z). For non-ASCII text, ROT47 will be performed in any
-case."
- (setq stride-ascii
- (if stride-ascii
- (mod stride-ascii 26)
- 13))
- (mapconcat (function
- (lambda (chr)
- (if (< chr 128)
- (cond ((and (<= ?A chr) (<= chr ?Z))
- (setq chr (+ chr stride-ascii))
- (if (> chr ?Z)
- (setq chr (- chr 26))
- ))
- ((and (<= ?a chr) (<= chr ?z))
- (setq chr (+ chr stride-ascii))
- (if (> chr ?z)
- (setq chr (- chr 26))
- )))
- (let ((octet (logand chr 127)))
- (if (and (< 32 octet) (< octet 127))
- (setq chr
- (if (< octet 80)
- (+ chr 47)
- (- chr 47)))
- )))
- (char-to-string chr)
- )) string "")
- )
+(require 'emu) ; for backward compatibility.
+(require 'poe) ; char-after.
+(require 'poem) ; charset-chars, char-charset,
+ ; and split-char.