Fix for what-page (Bug#6825).
authorChong Yidong <cyd@stupidchicken.com>
Sun, 10 Apr 2011 20:52:31 +0000 (16:52 -0400)
committerChong Yidong <cyd@stupidchicken.com>
Sun, 10 Apr 2011 20:52:31 +0000 (16:52 -0400)
* textmodes/page.el (what-page): Use line-number-at-pos to
calculate line number.

lisp/ChangeLog
lisp/textmodes/page.el

index a2ed50e..c89bb3f 100644 (file)
@@ -1,3 +1,8 @@
+2011-04-10  Stephen Berman <stephen.berman@gmx.net>
+
+       * textmodes/page.el (what-page): Use line-number-at-pos to
+       calculate line number (Bug#6825).
+
 2011-04-10  Chong Yidong  <cyd@stupidchicken.com>
 
        * mouse.el (mouse-drag-mode-line-1): Make sure that if we push
index d71e200..a758a9b 100644 (file)
@@ -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))))))
+
+
 \f
 ;;; Place `provide' at end of file.
 (provide 'page)