aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/mail
diff options
context:
space:
mode:
authorGlenn Morris2009-02-05 06:40:01 +0000
committerGlenn Morris2009-02-05 06:40:01 +0000
commit6b6a84a15bb95a7762171752fbadee4eaf09d056 (patch)
tree9f25dc68c51e38dfee0a20b4f7d78ce6d0135cbc /lisp/mail
parentc261086e81d0ba86a6faa1cb581072db76d8ed05 (diff)
downloademacs-6b6a84a15bb95a7762171752fbadee4eaf09d056.tar.gz
emacs-6b6a84a15bb95a7762171752fbadee4eaf09d056.zip
(rmail-what-message): Unbreak it.
Diffstat (limited to 'lisp/mail')
-rw-r--r--lisp/mail/rmail.el15
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index af0f66f0312..e6be1323806 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -2894,14 +2894,17 @@ or forward if N is negative."
2894 2894
2895(defun rmail-what-message () 2895(defun rmail-what-message ()
2896 "For debugging Rmail: find the message number that point is in." 2896 "For debugging Rmail: find the message number that point is in."
2897 (let ((where (point)) 2897 (let* ((high rmail-total-messages)
2898 (low 1) 2898 (mid (/ high 2))
2899 (high rmail-total-messages) 2899 (low 1)
2900 (mid (/ rmail-total-messages 2))) 2900 (where (with-current-buffer (if (rmail-buffers-swapped-p)
2901 rmail-view-buffer
2902 (current-buffer))
2903 (point))))
2901 (while (> (- high low) 1) 2904 (while (> (- high low) 1)
2902 (if (>= where (rmail-msgbeg mid)) 2905 (if (>= where (rmail-msgbeg mid))
2903 (setq low mid) 2906 (setq low mid)
2904 (setq high mid)) 2907 (setq high mid))
2905 (setq mid (+ low (/ (- high low) 2)))) 2908 (setq mid (+ low (/ (- high low) 2))))
2906 (if (>= where (rmail-msgbeg high)) high low))) 2909 (if (>= where (rmail-msgbeg high)) high low)))
2907 2910