[Top][All Lists]

[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 <address@hidden> 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

reply via email to

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