]> code.delx.au - gnu-emacs/commitdiff
rmailsum.el minor optional argument fix
authorGlenn Morris <rgm@gnu.org>
Tue, 24 Feb 2015 07:43:58 +0000 (23:43 -0800)
committerGlenn Morris <rgm@gnu.org>
Tue, 24 Feb 2015 07:43:58 +0000 (23:43 -0800)
* 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
lisp/mail/rmailsum.el

index 165c1ce96de522053783377e1241be15f88e22d3..25b3266675478b3f1fbe04baa202aa7ac4195b02 100644 (file)
@@ -1,5 +1,9 @@
 2015-02-24  Glenn Morris  <rgm@gnu.org>
 
+       * 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
index 7ac147b87d7a4f8c99c296a05b2f9b9ef371e566..bfcd81cedb8b94cd23d01462e3bf59dc10a68b0b 100644 (file)
@@ -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))