]> code.delx.au - gnu-emacs/commitdiff
Fix bug #17560 with backward-incompatible API change in rmail-delete-*.
authorKen Olum <kdo@cosmos.phy.tufts.edu>
Fri, 30 May 2014 09:33:43 +0000 (12:33 +0300)
committerEli Zaretskii <eliz@gnu.org>
Fri, 30 May 2014 09:33:43 +0000 (12:33 +0300)
 lisp/mail/rmail.el (rmail-delete-forward, rmail-delete-backward): The
 argument COUNT is now optional, to be more backward-compatible.
 Doc fix.

 etc/NEWS: Document the API change.

etc/NEWS
lisp/ChangeLog
lisp/mail/rmail.el

index 2177b948c420d76af63eb34ba20e59e3f468ddb2..bebe71d37b83e4fe3dbcbc1fc327a77bbdd204bf 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -146,6 +146,9 @@ permissions set to temporary values (e.g., for creating private files).
 
 ** You can access the slots of structures using `cl-struct-slot-value'.
 
+** Functions `rmail-delete-forward' and `rmail-delete-backward' take an
+optional repeat-count argument.
+
 \f
 * Changes in Emacs 24.5 on Non-Free Operating Systems
 
index a94f977e75521ccf6ec2f2075f0a6123462d27db..eeca63a1bc9395fca7afcc992903b463e29cec87 100644 (file)
@@ -1,3 +1,9 @@
+2014-05-30    Ken Olum  <kdo@cosmos.phy.tufts.edu>  (tiny change)
+
+       * mail/rmail.el (rmail-delete-forward, rmail-delete-backward): The
+       argument COUNT is now optional, to be more backward-compatible.
+       Doc fix.  (Bug#17560)
+
 2014-05-29  Reuben Thomas  <rrt@sc3d.org>
 
        * whitespace.el (whitespace-report-region): Simplify
index 2c5325dd4c5f13eaee619e84ae1abfe67337a6ee..f76920449f2321afa744ab03ac0310f01896e9f7 100644 (file)
@@ -3476,11 +3476,12 @@ STATE non-nil means mark as deleted."
 (defun rmail-delete-forward (&optional count)
   "Delete this message and move to next nondeleted one.
 Deleted messages stay in the file until the \\[rmail-expunge] command is given.
-A prefix argument is a repeat count;
+Optional argument COUNT (interactively, prefix argument) is a repeat count;
 negative argument means move backwards instead of forwards.
 
 Returns t if a new message is displayed after the delete, or nil otherwise."
   (interactive "p")
+  (if (not count) (setq count 1))
   (let (value backward)
     (if (< count 0)
        (setq count (- count) backward t))
@@ -3495,15 +3496,16 @@ Returns t if a new message is displayed after the delete, or nil otherwise."
     (rmail-maybe-display-summary)
     value))
 
-(defun rmail-delete-backward (count)
+(defun rmail-delete-backward (&optional count)
   "Delete this message and move to previous nondeleted one.
 Deleted messages stay in the file until the \\[rmail-expunge] command is given.
-A prefix argument is a repeat count;
+Optional argument COUNT (interactively, prefix argument) is a repeat count;
 negative argument means move forwards instead of backwards.
 
 Returns t if a new message is displayed after the delete, or nil otherwise."
 
   (interactive "p")
+  (if (not count) (setq count 1))
   (rmail-delete-forward (- count)))
 \f
 ;; Expunging.