(narrow-to-region start end)
(goto-char start)
(while (< (point)(point-max))
- (let* ((chr (char-after (point)))
- (charset (char-charset chr))
- )
- (if (eq charset 'ascii)
- (cond ((and (<= ?A chr) (<= chr ?Z))
- (setq chr (+ chr stride-ascii))
- (if (> chr ?Z)
- (setq chr (- chr 26))
- )
- (delete-char 1)
- (insert chr)
- )
- ((and (<= ?a chr) (<= chr ?z))
- (setq chr (+ chr stride-ascii))
- (if (> chr ?z)
- (setq chr (- chr 26))
- )
- (delete-char 1)
- (insert chr)
- )
- (t
- (forward-char)
- ))
- (let* ((stride (lsh (charset-chars charset) -1))
- (ret (mapcar (function
- (lambda (octet)
- (if (< octet 80)
- (+ octet stride)
- (- octet stride)
- )))
- (cdr (split-char chr)))))
- (delete-char 1)
- (insert (make-char (char-charset chr)
- (car ret)(car (cdr ret))))
- )))))))
-
+ (let* ((chr (char-after (point))))
+ (cond ((and (<= ?A chr) (<= chr ?Z))
+ (setq chr (+ chr stride-ascii))
+ (if (> chr ?Z)
+ (setq chr (- chr 26))
+ )
+ (delete-char 1)
+ (insert chr)
+ )
+ ((and (<= ?a chr) (<= chr ?z))
+ (setq chr (+ chr stride-ascii))
+ (if (> chr ?z)
+ (setq chr (- chr 26))
+ )
+ (delete-char 1)
+ (insert chr)
+ )
+ ((<= chr ?\x9f)
+ (forward-char)
+ )
+ (t
+ (let* ((stride (lsh (charset-chars (char-charset chr)) -1))
+ (ret (mapcar (function
+ (lambda (octet)
+ (if (< octet 80)
+ (+ octet stride)
+ (- octet stride)
+ )))
+ (cdr (split-char chr)))))
+ (delete-char 1)
+ (insert (make-char (char-charset chr)
+ (car ret)(car (cdr ret))))
+ )))
+ )))))
+
(provide 'mule-caesar)