[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: |
Wed, 31 Dec 2014 14:25:13 +0100 |
On 2014-12-31, at 12:50, Leo Liu <sdl.web@gmail.com> wrote:
> On 2014-12-31 01:05 +1100, Marcin Borkowski wrote:
>> I finally had some time to look into the code. Could you tell me why
>> this?
>>
>> (unless (looking-at-p "^\\s-*$")
>
> It ignores blank lines as the doc-string says.
Ah, my bad: it's \s- that matches whitespace, not \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?
>
> Either I was being defensive or there were some cases that could have
> end < beg.
I guess that would not be possible, but I might be mistaken.
> HTH,
> Leo
Yes, thanks!
--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University