bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#7115: 23.1; count-lines


From: Andreas Röhler
Subject: bug#7115: 23.1; count-lines
Date: Mon, 27 Sep 2010 13:15:46 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.11) Gecko/20100711 Thunderbird/3.0.6


Hi,

`count-lines' returns different values
if cursor is at the bol or not.

The bug is reffered to in the docu already,

"...but can be one more if START is not equal to END
and the greater of them is not at the start of a line."

Looks like a doku bug too: if start is equal to end,
which lines are to count?

IMHO there is no need for these bugs.

Also `count-lines' should have a default value for it's
arguments,

(point-min) (point) for example.

What about to implement it simply

(1+ (count-matches "[\n\C-m]" start end))

Thanks

Andreas

GNU Emacs 23.1.1 (i586-suse-linux-gnu, GTK+ Version 2.20.1) of 2010-07-05

--
https://code.launchpad.net/~a-roehler/python-mode
https://code.launchpad.net/s-x-emacs-werkstatt/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]