emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master f418e99: rmailsum.el minor optional argument fix


From: Glenn Morris
Subject: [Emacs-diffs] master f418e99: rmailsum.el minor optional argument fix
Date: Tue, 24 Feb 2015 07:44:10 +0000

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

    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 165c1ce..25b3266 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,9 @@
 2015-02-24  Glenn Morris  <address@hidden>
 
+       * 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 7ac147b..bfcd81c 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))



reply via email to

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