From: Chong Yidong Date: Sun, 10 Apr 2011 20:52:31 +0000 (-0400) Subject: Fix for what-page (Bug#6825). X-Git-Tag: emacs-pretest-24.0.90~104^3~77 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7e735aaf4d422be1c3bdf6a72e0ce6043a3e2cdf;p=emacs.git Fix for what-page (Bug#6825). * textmodes/page.el (what-page): Use line-number-at-pos to calculate line number. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a2ed50e4b6f..c89bb3f281a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-04-10 Stephen Berman + + * textmodes/page.el (what-page): Use line-number-at-pos to + calculate line number (Bug#6825). + 2011-04-10 Chong Yidong * mouse.el (mouse-drag-mode-line-1): Make sure that if we push diff --git a/lisp/textmodes/page.el b/lisp/textmodes/page.el index d71e20030ff..a758a9ba998 100644 --- a/lisp/textmodes/page.el +++ b/lisp/textmodes/page.el @@ -156,9 +156,9 @@ thus showing a page other than the one point was originally in." (if (= (match-beginning 0) (match-end 0)) (forward-char 1)) (setq count (1+ count))) - (message "Page %d, line %d" - count - (1+ (count-lines (point) opoint))))))) + (message "Page %d, line %d" count (line-number-at-pos opoint)))))) + + ;;; Place `provide' at end of file. (provide 'page)