emacs-devel
[Top][All Lists]
Advanced

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

Re: Inconsistency in font-lock


From: Herbert Euler
Subject: Re: Inconsistency in font-lock
Date: Thu, 26 Apr 2007 12:17:26 +0800

> It's not nice.  We should write:
> (defun font-lock-default-fontify-region (beg end &optional loudly)

I think we should fix the docstring instead and just say that the function
is called with 3 arguments.  How that function accepts them is irrelevant
(the function may have 4 optional arguments if the programmer feels like
it).

Well, from the caller's point of view, the third argument is less
meaningful.  In my opinion,

   (funcall font-lock-fontify-region-function start end nil)

is a bit worse than

   (funcall font-lock-fontify-region-function start end)

since the third argument `nil' is a surprise here.  Only start and
end positions are necessary for operations on a region.

Regards,
Guanpeng Xu

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/





reply via email to

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