From: Glenn Morris Date: Tue, 24 Feb 2015 07:43:58 +0000 (-0800) Subject: rmailsum.el minor optional argument fix X-Git-Tag: emacs-25.0.90~2564^2~306 X-Git-Url: https://code.delx.au/gnu-emacs/commitdiff_plain/f418e991c052a1f9c4ad5b877a47de524c24a892 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 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 165c1ce96d..25b3266675 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 7ac147b87d..bfcd81cedb 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))