* message.el (message-caesar-buffer-body): Allow rotating headers.
authorReiner Steib <Reiner.Steib@gmx.de>
Thu, 31 Aug 2006 20:29:14 +0000 (20:29 +0000)
committerReiner Steib <Reiner.Steib@gmx.de>
Thu, 31 Aug 2006 20:29:14 +0000 (20:29 +0000)
* gnus-sum.el (gnus-summary-caesar-message): Allow rotating headers.

lisp/ChangeLog
lisp/gnus-sum.el
lisp/message.el

index 113d254..7e002af 100644 (file)
@@ -1,5 +1,9 @@
 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> .
 
index ed2c1c7..cfc0f28 100644 (file)
@@ -9164,8 +9164,8 @@ If ARG is a negative number, hide the unwanted header lines."
 
 (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 ""))
@@ -9174,7 +9174,9 @@ forward."
        (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))
index 7dbbdeb..8ace090 100644 (file)
@@ -3257,17 +3257,17 @@ text was killed."
      (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))))