* gnus-sum.el (gnus-summary-caesar-message): Allow rotating headers.
2006-08-31 Reiner Steib <Reiner.Steib@gmx.de>
+ * message.el (message-caesar-buffer-body): Allow rotating headers.
+
+ * gnus-sum.el (gnus-summary-caesar-message): Allow rotating headers.
+
* message.el (message-insert-formated-citation-line): Fix %f.
Reported by Torsten Bronger <bronger@physik.rwth-aachen.de> .
(defun gnus-summary-caesar-message (&optional arg)
"Caesar rotate the current article by 13.
-The numerical prefix specifies how many places to rotate each letter
-forward."
+With a non-numerical prefix, also rotate headers. A numerical
+prefix specifies how many places to rotate each letter forward."
(interactive "P")
(gnus-summary-select-article)
(let ((mail-header-separator ""))
(widen)
(let ((start (window-start))
buffer-read-only)
- (message-caesar-buffer-body arg)
+ (if (equal arg '(4))
+ (message-caesar-buffer-body nil t)
+ (message-caesar-buffer-body arg))
(set-window-start (get-buffer-window (current-buffer)) start)))))
;; Create buttons and stuff...
(gnus-treat-article nil))
(substring table ?a (+ ?a n))
(substring table (+ ?a 26) 255))))
-(defun message-caesar-buffer-body (&optional rotnum)
+(defun message-caesar-buffer-body (&optional rotnum wide)
"Caesar rotate all letters in the current buffer by 13 places.
Used to encode/decode possibly offensive messages (commonly in rec.humor).
With prefix arg, specifies the number of places to rotate each letter forward.
-Mail and USENET news headers are not rotated."
+Mail and USENET news headers are not rotated unless WIDE is non-nil."
(interactive (if current-prefix-arg
(list (prefix-numeric-value current-prefix-arg))
(list nil)))
(save-excursion
(save-restriction
- (when (message-goto-body)
+ (when (and (not wide) (message-goto-body))
(narrow-to-region (point) (point-max)))
(message-caesar-region (point-min) (point-max) rotnum))))