[Top][All Lists]

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

Re: point-min and 1

From: martin rudalics
Subject: Re: point-min and 1
Date: Thu, 13 Aug 2009 11:53:18 +0200
User-agent: Thunderbird (Windows/20090302)

> As a general rule, using 1 rather than (point-min) tends to also
> introduce bugs where code only works when the buffer is widened,

What sort of bugs?  I suppose for every buffer

1 <= (point-min)

holds invariantly.  If the buffer is narrowed, clip_to_bounds asserts
that (goto-char 1) goes to (goto-char (point-min)) so these two idioms
are semantically equivalent regardless of whether a buffer is narrowed
or not.  Or what am I missing?

> so it's
> good practice to prefer (point-min) over 1.


reply via email to

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