diff options
| author | Eli Zaretskii | 2021-02-05 16:27:51 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2021-02-05 16:27:51 +0200 |
| commit | 0484879d3b0f81222bacbc3c9655d1cfcdb5d321 (patch) | |
| tree | ba90c0f1f1261dc94252582652ed3c6f36462bcb | |
| parent | d5b1deb62e7fe56ccd88348e885a589ff8098106 (diff) | |
| download | emacs-0484879d3b0f81222bacbc3c9655d1cfcdb5d321.tar.gz emacs-0484879d3b0f81222bacbc3c9655d1cfcdb5d321.zip | |
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)
| -rw-r--r-- | lisp/mail/rmailsum.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index 7f99ecdcf2c..f53e6e768f8 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el | |||
| @@ -930,10 +930,11 @@ a negative argument means to delete and move backward." | |||
| 930 | (unless (numberp count) (setq count 1)) | 930 | (unless (numberp count) (setq count 1)) |
| 931 | (let (del-msg | 931 | (let (del-msg |
| 932 | (backward (< count 0))) | 932 | (backward (< count 0))) |
| 933 | (while (and (/= count 0) | 933 | (while (/= count 0) |
| 934 | ;; Don't waste time if we are at the beginning | 934 | ;; Don't waste time counting down without doing anything if we |
| 935 | ;; and trying to go backward. | 935 | ;; are at the beginning and trying to go backward. |
| 936 | (not (and backward (bobp)))) | 936 | (if (and backward (bobp)) |
| 937 | (setq count -1)) | ||
| 937 | (rmail-summary-goto-msg) | 938 | (rmail-summary-goto-msg) |
| 938 | (with-current-buffer rmail-buffer | 939 | (with-current-buffer rmail-buffer |
| 939 | (setq del-msg rmail-current-message) | 940 | (setq del-msg rmail-current-message) |