emacs-diffs
[Top][All Lists]
Advanced

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

master 0484879: Fix 'C-d' on the first line in Rmail summary buffer


From: Eli Zaretskii
Subject: master 0484879: Fix 'C-d' on the first line in Rmail summary buffer
Date: Fri, 5 Feb 2021 09:28:44 -0500 (EST)

branch: master
commit 0484879d3b0f81222bacbc3c9655d1cfcdb5d321
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Fix 'C-d' on the first line in Rmail summary buffer
    
    * lisp/mail/rmailsum.el (rmail-summary-delete-forward): Fix
    deleting backward past the beginning of the summary buffer.
    (Bug#46325)
---
 lisp/mail/rmailsum.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index 7f99ecd..f53e6e7 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -930,10 +930,11 @@ a negative argument means to delete and move backward."
   (unless (numberp count) (setq count 1))
   (let (del-msg
         (backward (< count 0)))
-    (while (and (/= count 0)
-               ;; Don't waste time if we are at the beginning
-               ;; and trying to go backward.
-               (not (and backward (bobp))))
+    (while (/= count 0)
+      ;; Don't waste time counting down without doing anything if we
+      ;; are at the beginning and trying to go backward.
+      (if (and backward (bobp))
+          (setq count -1))
       (rmail-summary-goto-msg)
       (with-current-buffer rmail-buffer
        (setq del-msg rmail-current-message)



reply via email to

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