From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: point-min and 1 Date: Thu, 13 Aug 2009 00:38:57 -0400 Message-ID: References: <83vdkvjbet.fsf@gnu.org> <83skfyjj56.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1250139039 10848 80.91.229.12 (13 Aug 2009 04:50:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Aug 2009 04:50:39 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 13 06:50:30 2009 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 1MbSGj-0004Lq-S2 for ged-emacs-devel@m.gmane.org; Thu, 13 Aug 2009 06:50:30 +0200 Original-Received: from localhost ([127.0.0.1]:55515 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MbSGh-0004OV-39 for ged-emacs-devel@m.gmane.org; Thu, 13 Aug 2009 00:50:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MbSGZ-0004Nk-7n for emacs-devel@gnu.org; Thu, 13 Aug 2009 00:50:19 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MbSGU-0004MW-1u for emacs-devel@gnu.org; Thu, 13 Aug 2009 00:50:18 -0400 Original-Received: from [199.232.76.173] (port=41639 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MbSGT-0004MN-MP for emacs-devel@gnu.org; Thu, 13 Aug 2009 00:50:13 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:55729) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MbSGT-00083B-C6 for emacs-devel@gnu.org; Thu, 13 Aug 2009 00:50:13 -0400 Original-Received: from eliz by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1MbS5Z-00027t-IU; Thu, 13 Aug 2009 00:38:57 -0400 In-reply-to: (message from Stefan Monnier on Wed, 12 Aug 2009 22:22:30 -0400) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:114166 Archived-At: > From: Stefan Monnier > Cc: emacs-devel@gnu.org > Date: Wed, 12 Aug 2009 22:22:30 -0400 > > Just the same old general programming principle that says that you > should avoid using integer constants and prefer to give them names, so > the intention is clear. In the case of "1", there might be many > different kinds of "1", it can be "1" the size of chars in a buffer, or > "1" the position of the second char in a string, or ... > As a general rule, using 1 rather than (point-min) tends to also > introduce bugs where code only works when the buffer is widened, so it's > good practice to prefer (point-min) over 1. Thanks. I don't necessarily agree with the reasoning, but at least I understand the reasons for the change now. If we want this to be a general style convention, perhaps we should say something about it in the ELisp manual.