From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Inconsistency in font-lock Date: Thu, 26 Apr 2007 10:04:59 -0400 Message-ID: References: <462FC009.6000208@gmx.at> <463043F6.1010404@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1177596342 31371 80.91.229.12 (26 Apr 2007 14:05:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 26 Apr 2007 14:05:42 +0000 (UTC) Cc: Herbert Euler , emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 26 16:05:39 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Hh4bG-0002p1-AD for ged-emacs-devel@m.gmane.org; Thu, 26 Apr 2007 16:05:38 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hh4gz-0005YS-8c for ged-emacs-devel@m.gmane.org; Thu, 26 Apr 2007 10:11:29 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hh4ga-0005Sc-9e for emacs-devel@gnu.org; Thu, 26 Apr 2007 10:11:04 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hh4gY-0005R6-Ib for emacs-devel@gnu.org; Thu, 26 Apr 2007 10:11:03 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hh4gY-0005Qw-B8 for emacs-devel@gnu.org; Thu, 26 Apr 2007 10:11:02 -0400 Original-Received: from tomts20.bellnexxia.net ([209.226.175.74] helo=tomts20-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Hh4an-0001TC-5I for emacs-devel@gnu.org; Thu, 26 Apr 2007 10:05:05 -0400 Original-Received: from pastel.home ([74.12.205.45]) by tomts20-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20070426140459.ZUBS1637.tomts20-srv.bellnexxia.net@pastel.home> for ; Thu, 26 Apr 2007 10:04:59 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 8EA4B8070; Thu, 26 Apr 2007 10:04:59 -0400 (EDT) In-Reply-To: <463043F6.1010404@gmx.at> (martin rudalics's message of "Thu\, 26 Apr 2007 08\:17\:26 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.97 (gnu/linux) X-detected-kernel: Solaris 8 (1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:70182 Archived-At: >>> 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). > I have no strong opinion. XEmacs has it optional ever since, IIRC. Whether the function has it optional or not is not the issue. The issue is that the code calls it with 3 arguments, so we should just say so rather than impose that the third be optional. Check the docstring of other foo-function(s) variables and you'll see that's how we normally document them: after-change-functions is a variable defined in `C source code'. Its value is nil Documentation: List of functions to call after each text change. Three arguments are passed to each function: the positions of the beginning and end of the range of changed text, and the length in bytes of the pre-change text replaced by that range. ... The after-change-functions can of course decide to leave the 3rd argument as optional. Stefan