From 7e735aaf4d422be1c3bdf6a72e0ce6043a3e2cdf Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 10 Apr 2011 16:52:31 -0400 Subject: [PATCH] Fix for what-page (Bug#6825). * textmodes/page.el (what-page): Use line-number-at-pos to calculate line number. --- lisp/ChangeLog | 5 +++++ lisp/textmodes/page.el | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) 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) -- 2.39.2