# HG changeset patch # User Glenn Morris # Date 1233816001 0 # Node ID 57264a933a6346ae8dc4f0663aa48b8f73dfe412 # Parent c47e321c9092e8fe22b49c7ccd1c719e6c2d8e32 (rmail-what-message): Unbreak it. diff -r c47e321c9092 -r 57264a933a63 lisp/ChangeLog --- 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 + + * 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 * net/imap.el (imap-fetch-safe): Bind debug-on-error. diff -r c47e321c9092 -r 57264a933a63 lisp/mail/rmail.el --- 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)))