From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: gebser@ameritech.net Newsgroups: gmane.emacs.help Subject: What's a better regexp for 'sentence-end' variable?? Date: Tue, 18 Feb 2003 08:16:26 -0500 (EST) Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: Reply-To: gebser@ameritech.net NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: main.gmane.org 1045574157 17333 80.91.224.249 (18 Feb 2003 13:15:57 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 18 Feb 2003 13:15:57 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18l7bH-0004VP-00 for ; Tue, 18 Feb 2003 14:15:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18l7c1-0002g0-02 for gnu-help-gnu-emacs@m.gmane.org; Tue, 18 Feb 2003 08:16:41 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18l7bn-0002fZ-00 for help-gnu-emacs@gnu.org; Tue, 18 Feb 2003 08:16:27 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18l7bm-0002fK-00 for help-gnu-emacs@gnu.org; Tue, 18 Feb 2003 08:16:27 -0500 Original-Received: from mailhost2-bcvloh.bcvloh.ameritech.net ([66.73.20.44] helo=mailhost.bcv2.ameritech.net) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18l7bm-0002fB-00 for help-gnu-emacs@gnu.org; Tue, 18 Feb 2003 08:16:26 -0500 Original-Received: from heidegger.mousecar.net ([65.43.210.108]) by mailhost.bcv2.ameritech.net (InterMail vM.4.01.02.17 201-229-119) with ESMTP <20030218131624.OLVG366.mailhost.bcv2.ameritech.net@heidegger.mousecar.net> for ; Tue, 18 Feb 2003 08:16:24 -0500 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:6835 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:6835 Hello, all, Happy snowstorm! This problem has required some thought and, frankly,I don't think it can be done-- not without some considerable rewriting of elisp code. Because I do considerable editing of html and similar types of files, I wanted to add to the standard definition of "sentence-end". I.e., I wanted emacs to consider an end of sentence such character sequences which have ".", "?", or "!" when they are followed by either a "<" or ">". The standard end-of-sentence variable is defined as: (defcustom sentence-end (purecopy "[.?!][]\"')}]*\\($\\| $\\|\t\\| \\)[ \t\n]*") Initially I thought that just adding the "<" and ">" characters would do it. I.e.: (defcustom sentence-end (purecopy "[.?!][]\<>\"')}]*\\($\\| $\\|\t\\| \\)[ \t\n]*") (the above should be all on one line) would do this. It doesn't because I want the cursor to land on top of the ">" or "<" character immediately after string comprising the standard definition. That is, given: end.

hitting M-e would place the cursor after the period. So what's the proper syntax to have emacs see ".", "!", or "?" (and other expressions defined by the default "sentence-end variable) as the end of a sentence when one of them is followed by either the ">" or "<" characters? The reason I said that I didn't think this could be done simply is because it seems that emacs would have to search and find strings such as ".<" or ". <" or "? <" and then back up a character or two or three. Hope I've been clear enough. tia, ken