Mercurial > emacs
changeset 101810:57264a933a63
(rmail-what-message): Unbreak it.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Thu, 05 Feb 2009 06:40:01 +0000 |
parents | c47e321c9092 |
children | 85596010327a |
files | lisp/ChangeLog lisp/mail/rmail.el |
diffstat | 2 files changed, 17 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Thu Feb 05 06:36:14 2009 +0000 +++ b/lisp/ChangeLog Thu Feb 05 06:40:01 2009 +0000 @@ -1,3 +1,11 @@ +2009-02-05 Glenn Morris <rgm@gnu.org> + + * mail/rmail.el (rmail-what-message): Unbreak it. + + * net/mairix.el (rmail-buffer): Remove unneeded eval-when-compile. + (rmail-narrow-to-non-pruned-header): Remove autoload. + (mairix-rmail-fetch-field): Handle mbox Rmail. + 2009-02-04 Dave Love <fx@gnu.org> * net/imap.el (imap-fetch-safe): Bind debug-on-error.
--- a/lisp/mail/rmail.el Thu Feb 05 06:36:14 2009 +0000 +++ b/lisp/mail/rmail.el Thu Feb 05 06:40:01 2009 +0000 @@ -2894,14 +2894,17 @@ (defun rmail-what-message () "For debugging Rmail: find the message number that point is in." - (let ((where (point)) - (low 1) - (high rmail-total-messages) - (mid (/ rmail-total-messages 2))) + (let* ((high rmail-total-messages) + (mid (/ high 2)) + (low 1) + (where (with-current-buffer (if (rmail-buffers-swapped-p) + rmail-view-buffer + (current-buffer)) + (point)))) (while (> (- high low) 1) (if (>= where (rmail-msgbeg mid)) - (setq low mid) - (setq high mid)) + (setq low mid) + (setq high mid)) (setq mid (+ low (/ (- high low) 2)))) (if (>= where (rmail-msgbeg high)) high low)))