+ (when (featurep 'font-lock)
+ (font-lock-set-defaults)))
+
+(defun message-xmas-make-caesar-translation-table (n)
+ "Create a rot table with offset N."
+ (let ((i -1)
+ (table (make-string 256 0))
+ (a (mm-char-int ?a))
+ (A (mm-char-int ?A)))
+ (while (< (incf i) 256)
+ (aset table i i))
+ (concat
+ (substring table 0 A)
+ (substring table (+ A n) (+ A n (- 26 n)))
+ (substring table A (+ A n))
+ (substring table (+ A 26) a)
+ (substring table (+ a n) (+ a n (- 26 n)))
+ (substring table a (+ a n))
+ (substring table (+ a 26) 255))))