From f418e991c052a1f9c4ad5b877a47de524c24a892 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 23 Feb 2015 23:43:58 -0800 Subject: [PATCH] rmailsum.el minor optional argument fix * lisp/mail/rmailsum.el (rmail-summary-next-all) (rmail-summary-previous-all, rmail-summary-next-msg): Fix handling of optional argument. Fixes: debbugs:19916 --- lisp/ChangeLog | 4 ++++ lisp/mail/rmailsum.el | 9 ++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 165c1ce96de..25b32666754 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2015-02-24 Glenn Morris + * mail/rmailsum.el (rmail-summary-next-all) + (rmail-summary-previous-all, rmail-summary-next-msg): + Fix handling of optional argument. (Bug#19916) + * progmodes/f90.el (f90-beginning-of-subprogram) (f90-end-of-subprogram, f90-match-end): Handle continued strings where the continuation does not start diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index 7ac147b87d7..bfcd81cedb8 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el @@ -791,7 +791,7 @@ the message being processed." (forward-line 1) (setq str (buffer-substring pos (1- (point)))) (while (looking-at "[ \t]") - (setq str (concat str " " + (setq str (concat str " " (buffer-substring (match-end 0) (line-end-position)))) (forward-line 1)) @@ -804,7 +804,8 @@ the message being processed." (defun rmail-summary-next-all (&optional number) (interactive "p") - (forward-line (if number number 1)) + (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)) @@ -812,7 +813,8 @@ the message being processed." (defun rmail-summary-previous-all (&optional number) (interactive "p") - (forward-line (- (if number number 1))) + (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)) @@ -823,6 +825,7 @@ the message being processed." With optional prefix argument NUMBER, moves forward this number of non-deleted messages, or backward if NUMBER is negative." (interactive "p") + (or number (setq number 1)) (forward-line 0) (and (> number 0) (end-of-line)) (let ((count (if (< number 0) (- number) number)) -- 2.39.2