From 0c4f73a09d9069824911420f0205da0dd90c1504 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 24 Feb 2015 18:10:36 -0500 Subject: [PATCH] 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 76f9eb40194..5fa7ef757b3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2015-02-24 Glenn Morris + + * mail/rmailsum.el (rmail-summary-previous-all) + (rmail-summary-previous-msg): Simplify. + 2015-02-25 Artur Malabarba * simple.el (region-active-p): Fix doc to say non-nil. diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index bfcd81cedb8..7144e43d301 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: emacs-devel@gnu.org ;; 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. -- 2.39.2