emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 0c4f73a: rmailsum.el tiny simplification


From: Glenn Morris
Subject: [Emacs-diffs] master 0c4f73a: rmailsum.el tiny simplification
Date: Tue, 24 Feb 2015 23:10:40 +0000

branch: master
commit 0c4f73a09d9069824911420f0205da0dd90c1504
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    rmailsum.el tiny simplification
    
    * lisp/mail/rmailsum.el (rmail-summary-previous-all)
    (rmail-summary-previous-msg): Simplify.
---
 lisp/ChangeLog        |    5 +++++
 lisp/mail/rmailsum.el |   12 +++---------
 2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 76f9eb4..5fa7ef7 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2015-02-24  Glenn Morris  <address@hidden>
+
+       * mail/rmailsum.el (rmail-summary-previous-all)
+       (rmail-summary-previous-msg): Simplify.
+
 2015-02-25  Artur Malabarba  <address@hidden>
 
        * simple.el (region-active-p): Fix doc to say non-nil.
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index bfcd81c..7144e43 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -1,7 +1,6 @@
 ;;; rmailsum.el --- make summary buffers for the mail reader
 
-;; Copyright (C) 1985, 1993-1996, 2000-2015 Free Software Foundation,
-;; Inc.
+;; Copyright (C) 1985, 1993-1996, 2000-2015 Free Software Foundation, Inc.
 
 ;; Maintainer: address@hidden
 ;; Keywords: mail
@@ -813,12 +812,7 @@ the message being processed."
 
 (defun rmail-summary-previous-all (&optional number)
   (interactive "p")
-  (or number (setq number 1))
-  (forward-line (- number))
-  ;; It doesn't look nice to move forward past the last message line.
-  (and (eobp) (< number 0)
-       (forward-line -1))
-  (display-buffer rmail-buffer))
+  (rmail-summary-next-all (- (or number 1))))
 
 (defun rmail-summary-next-msg (&optional number)
   "Display next non-deleted msg from rmail file.
@@ -843,7 +837,7 @@ messages, or backward if NUMBER is negative."
 With optional prefix argument NUMBER, moves backward this number of
 non-deleted messages."
   (interactive "p")
-  (rmail-summary-next-msg (- (if number number 1))))
+  (rmail-summary-next-msg (- (or number 1))))
 
 (defun rmail-summary-next-labeled-message (n labels)
   "Show next message with LABELS.  Defaults to last labels used.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]