From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Jesper Harder Newsgroups: gmane.emacs.help Subject: Re: what is the point of point-min? Date: Sat, 30 Aug 2003 04:54:48 +0200 Organization: http://purl.org/harder/ Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <3F4E2B31.5070904@yahoo.com> <1a61f7e5.0308290444.10893c35@posting.google.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1062215487 24603 80.91.224.253 (30 Aug 2003 03:51:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 30 Aug 2003 03:51:27 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 30 05:51:25 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19swlp-0000MR-00 for ; Sat, 30 Aug 2003 05:51:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.22) id 19swgH-0005q5-Ra for geh-help-gnu-emacs@m.gmane.org; Fri, 29 Aug 2003 23:45:41 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!not-for-mail Original-Newsgroups: gnu.emacs.help X-Face: ^RrvqCr7c,P$zTR:QED"@h9+BTm-"fjZJJ-3=OU7.)i/K]<.J88}s>'Z_$r; List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:12196 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:12196 robert.thorpe@antenova.com (Rob Thorpe) writes: > Jesper Harder wrote: >> if there's no difference between (region-end) and (max (point) >> (mark)). > > Secondly it will obey the value of the variable transient-mark-mode, > if it is set to non-nil then the mark will deactivate when the > buffer contents change. Given the function you have posted: > > (global-set-key [delete] > (lambda () (interactive) > (if mark-active > (kill-region (point) (mark)) > (delete-char 1)))) > > This version in transient mark mode will delete the region even though > in this mode it is not thought of as existing after a character is > inserted into the buffer. I don't understand that. The code tests `mark-active', so it won't delete the region in transient-mark-mode if the region is inactive (i.e. the mark is deactivated).