]> code.delx.au - gnu-emacs/commitdiff
(rmail-summary-end-of-message): New command to go to the bottom of the mail
authorEli Zaretskii <eliz@gnu.org>
Fri, 12 Aug 2005 10:28:48 +0000 (10:28 +0000)
committerEli Zaretskii <eliz@gnu.org>
Fri, 12 Aug 2005 10:28:48 +0000 (10:28 +0000)
message.  Added to `rmail-summary-mode-map' with key "/".
(rmail-summary-show-message): New (internal) function for use by both
`rmail-summary-beginning/end-of-message'.
(rmail-summary-beginning-of-message): Changed to use
rmail-summary-show-message.

lisp/ChangeLog
lisp/mail/rmailsum.el

index 3ce168985922ff30b8b7e5fed085d92e325fd511..205c0ef298d21e046502bf086cdeef9e2bfb2666 100644 (file)
@@ -1,5 +1,18 @@
 2005-08-12  Ehud Karni  <ehud@unix.mvs.co.il>
 
+       * mail/rmailsum.el (rmail-summary-end-of-message): New command
+       to go to the bottom of the mail message.  Added to
+       `rmail-summary-mode-map' with key "/".
+       (rmail-summary-show-message): New (internal) function for use by
+       both `rmail-summary-beginning/end-of-message'.
+       (rmail-summary-beginning-of-message): Changed to use
+       rmail-summary-show-message.
+
+       * mail/rmail.el (rmail-end-of-message): New command to go to the
+       end of the current message.  Added to `rmail-mode-map' with key "/".
+       (rmail-beginning-of-message): Fixed to work as documented.
+       (rmail-mode): Change documentation.
+
        * progmodes/compile.el (compilation-start): Add the line
        "Compilation started" with compilation start time.
         (compilation-mode-font-lock-keywords): Add `started' to keywords.
index 84db530c6fce3f532cddd91d4e920a01c47e68c4..129f3f485289ebd9c1637764ffcf624134af2492 100644 (file)
@@ -898,6 +898,7 @@ Search, the `unseen' attribute is restored.")
   (define-key rmail-summary-mode-map "x"      'rmail-summary-expunge)
   (define-key rmail-summary-mode-map "w"      'rmail-summary-output-body)
   (define-key rmail-summary-mode-map "."      'rmail-summary-beginning-of-message)
+  (define-key rmail-summary-mode-map "/"      'rmail-summary-end-of-message)
   (define-key rmail-summary-mode-map "<"      'rmail-summary-first-message)
   (define-key rmail-summary-mode-map ">"      'rmail-summary-last-message)
   (define-key rmail-summary-mode-map " "      'rmail-summary-scroll-msg-up)
@@ -1185,6 +1186,16 @@ move to the previous message."
 (defun rmail-summary-beginning-of-message ()
   "Show current message from the beginning."
   (interactive)
+  (rmail-summary-show-message 'BEG))
+
+(defun rmail-summary-end-of-message ()
+  "Show bottom of current message."
+  (interactive)
+  (rmail-summary-show-message 'END))
+
+(defun rmail-summary-show-message (where)
+  "Show current mail message.
+Position it according to WHERE which can be BEG or END"
   (if (and (one-window-p) (not pop-up-frames))
       ;; If there is just one window, put the summary on the top.
       (let ((buffer rmail-view-buffer))
@@ -1196,8 +1207,14 @@ move to the previous message."
        (or (eq buffer (window-buffer (next-window (frame-first-window))))
            (delete-other-windows)))
     (pop-to-buffer rmail-view-buffer))
-  (with-no-warnings
-    (beginning-of-buffer))
+  (cond
+   ((eq where 'BEG)
+       (goto-char (point-min))
+       (search-forward "\n\n"))
+   ((eq where 'END)
+       (goto-char (point-max))
+       (recenter (1- (window-height))))
+   )
   (pop-to-buffer rmail-summary-buffer))
 
 (defun rmail-summary-bury ()