[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: what is the point of point-min?
From: |
Jesper Harder |
Subject: |
Re: what is the point of point-min? |
Date: |
Thu, 28 Aug 2003 02:23:03 +0200 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) |
Joe Corneli <jcorneli@math.utexas.edu> writes:
> and here is an alternative suggestion with one small change that I do
> not fully understand. Why would this be better?
>
> (global-set-key [delete]
> (lambda () (interactive)
> (if mark-active
> (kill-region (point) (mark))
> (delete-char (point-min)))))
No, using `point-min' is wrong.
`point-min' usually return 1, so you won't notice any difference. But
if the buffer is narrowed, point-min returns a different number ...
making the effect of pressing delete quite unpredictable.
There's also the built-in `delete-selection-mode' which does something
similar.
- what is the point of point-min?, Joe Corneli, 2003/08/27
- Re: what is the point of point-min?,
Jesper Harder <=
- Re: what is the point of point-min?, Kevin Rodgers, 2003/08/28
- Re: what is the point of point-min?, Jesper Harder, 2003/08/28
- Re: what is the point of point-min?, Barry Margolin, 2003/08/28
- Re: what is the point of point-min?, Jesper Harder, 2003/08/28
- Re: what is the point of point-min?, Kai Großjohann, 2003/08/28
- Re: what is the point of point-min?, Greg Hill, 2003/08/28
- Re: what is the point of point-min?, Eli Zaretskii, 2003/08/29
- Re: what is the point of point-min?, Johan Bockgård, 2003/08/28
- Message not available
- Re: what is the point of point-min?, Oliver Scholz, 2003/08/29
- Re: what is the point of point-min?, Eli Zaretskii, 2003/08/29