Commit e50e0340 authored by Ken Olum's avatar Ken Olum Committed by Eli Zaretskii

Fix bug #17560 with backward-incompatible API change in rmail-delete-*.

 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.
parent 6c572f9a
......@@ -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.
* Changes in Emacs 24.5 on Non-Free Operating Systems
......
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
......
......@@ -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)))
;; Expunging.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment