aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Olum2014-05-30 12:33:43 +0300
committerEli Zaretskii2014-05-30 12:33:43 +0300
commite50e034033a3ec5eae90a7fbcb6d2da0b5111787 (patch)
tree5deab7f2b825c67c296d2c75b3519ed32d4e37bc
parent6c572f9ab3d028dbc399fc97ff8d8a9835be20fe (diff)
downloademacs-e50e034033a3ec5eae90a7fbcb6d2da0b5111787.tar.gz
emacs-e50e034033a3ec5eae90a7fbcb6d2da0b5111787.zip
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.
-rw-r--r--etc/NEWS3
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/mail/rmail.el8
3 files changed, 14 insertions, 3 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 2177b948c42..bebe71d37b8 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -146,6 +146,9 @@ permissions set to temporary values (e.g., for creating private files).
146 146
147** You can access the slots of structures using `cl-struct-slot-value'. 147** You can access the slots of structures using `cl-struct-slot-value'.
148 148
149** Functions `rmail-delete-forward' and `rmail-delete-backward' take an
150optional repeat-count argument.
151
149 152
150* Changes in Emacs 24.5 on Non-Free Operating Systems 153* Changes in Emacs 24.5 on Non-Free Operating Systems
151 154
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a94f977e755..eeca63a1bc9 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12014-05-30 Ken Olum <kdo@cosmos.phy.tufts.edu> (tiny change)
2
3 * mail/rmail.el (rmail-delete-forward, rmail-delete-backward): The
4 argument COUNT is now optional, to be more backward-compatible.
5 Doc fix. (Bug#17560)
6
12014-05-29 Reuben Thomas <rrt@sc3d.org> 72014-05-29 Reuben Thomas <rrt@sc3d.org>
2 8
3 * whitespace.el (whitespace-report-region): Simplify 9 * whitespace.el (whitespace-report-region): Simplify
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 2c5325dd4c5..f76920449f2 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -3476,11 +3476,12 @@ STATE non-nil means mark as deleted."
3476(defun rmail-delete-forward (&optional count) 3476(defun rmail-delete-forward (&optional count)
3477 "Delete this message and move to next nondeleted one. 3477 "Delete this message and move to next nondeleted one.
3478Deleted messages stay in the file until the \\[rmail-expunge] command is given. 3478Deleted messages stay in the file until the \\[rmail-expunge] command is given.
3479A prefix argument is a repeat count; 3479Optional argument COUNT (interactively, prefix argument) is a repeat count;
3480negative argument means move backwards instead of forwards. 3480negative argument means move backwards instead of forwards.
3481 3481
3482Returns t if a new message is displayed after the delete, or nil otherwise." 3482Returns t if a new message is displayed after the delete, or nil otherwise."
3483 (interactive "p") 3483 (interactive "p")
3484 (if (not count) (setq count 1))
3484 (let (value backward) 3485 (let (value backward)
3485 (if (< count 0) 3486 (if (< count 0)
3486 (setq count (- count) backward t)) 3487 (setq count (- count) backward t))
@@ -3495,15 +3496,16 @@ Returns t if a new message is displayed after the delete, or nil otherwise."
3495 (rmail-maybe-display-summary) 3496 (rmail-maybe-display-summary)
3496 value)) 3497 value))
3497 3498
3498(defun rmail-delete-backward (count) 3499(defun rmail-delete-backward (&optional count)
3499 "Delete this message and move to previous nondeleted one. 3500 "Delete this message and move to previous nondeleted one.
3500Deleted messages stay in the file until the \\[rmail-expunge] command is given. 3501Deleted messages stay in the file until the \\[rmail-expunge] command is given.
3501A prefix argument is a repeat count; 3502Optional argument COUNT (interactively, prefix argument) is a repeat count;
3502negative argument means move forwards instead of backwards. 3503negative argument means move forwards instead of backwards.
3503 3504
3504Returns t if a new message is displayed after the delete, or nil otherwise." 3505Returns t if a new message is displayed after the delete, or nil otherwise."
3505 3506
3506 (interactive "p") 3507 (interactive "p")
3508 (if (not count) (setq count 1))
3507 (rmail-delete-forward (- count))) 3509 (rmail-delete-forward (- count)))
3508 3510
3509;; Expunging. 3511;; Expunging.