[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Counting SLOC in Emacs
From: |
Marcin Borkowski |
Subject: |
Re: Counting SLOC in Emacs |
Date: |
Tue, 30 Dec 2014 15:05:03 +0100 |
On 2014-12-03, at 02:14, Leo Liu <sdl.web@gmail.com> wrote:
> On 2014-12-02 09:35 -0500, Ted Zlatanov wrote:
>> This is useful.
>>
>> Could we have this added to `count-lines-region' with an optional
>> parameter, or provided by `prog-mode' specifically? It even merits a
>> modeline indicator that users can enable, I think.
>>
>> Ted
>
> I had such need last year but only used it a few days and then totally
> forgotten (never needed again). The code is still here
> https://github.com/leoliu/sloc.el/blob/master/sloc.el
Hi,
I finally had some time to look into the code. Could you tell me why
this?
(unless (looking-at-p "^\\s-*$")
(line 46 in sloc.el)? If I get it correctly, it ignores blank lines
/ending in any number of hyphens/ (possibly zero). Why?
Also, this
(let ((beg (min beg end))
(end (max beg end))
is probably not necessary, or do I miss something?
> Leo
Best,
--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University