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: Re: What's a better regexp for 'sentence-end' variable?? Date: Wed, 19 Feb 2003 13:41:37 -0500 Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: 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 1045680697 13078 80.91.224.249 (19 Feb 2003 18:51:37 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 19 Feb 2003 18:51:37 +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 18lZJ7-0003NG-00 for ; Wed, 19 Feb 2003 19:51:06 +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 18lZIj-0005Do-04 for gnu-help-gnu-emacs@m.gmane.org; Wed, 19 Feb 2003 13:50:37 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed1.e.nsc.no!nsc.no!nextra.com!uio.no!quimby.gnus.org!heidegger.mousecar.net!ken Original-Newsgroups: gnu.emacs.help Original-Lines: 53 Original-NNTP-Posting-Host: adsl-65-43-210-108.dsl.bcvloh.ameritech.net Original-X-Trace: quimby.gnus.org 1045680908 23761 65.43.210.108 (19 Feb 2003 18:55:08 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 19 Feb 2003 18:55:08 GMT In-Reply-To: Original-Xref: shelby.stanford.edu gnu.emacs.help:110394 X-Originally-To: Oliver Scholz 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:6896 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:6896 Oliver Scholz at 15:06 (UTC+0100) on Tue, 18 Feb 2003 said: = gebser@ameritech.net writes: = [...] = > 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 = > ">". = = [...] = > (defcustom sentence-end (purecopy "[.?!][]\<>\"')}]*\\($\\| $\\|\t\\| = > \\)[ \t\n]*") = = What is the `purecopy' in your code good for? You didn't change this = in the source code, did you? ;-) Ya got me. That's what's used in paragraphs.el where "sentence-end" is defined. = = [...] = > 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. = = I would do it with a simple bit of Elisp. You could put something = like the following into your ~/.emacs: = = = (defun my-html-forward-sentence () = (interactive) = (save-match-data = (if (re-search-forward "\\([.?!]\\)<" nil t) = (goto-char (match-end 1)) = (goto-char (point-max))))) This is pretty much what I wanted. Thanks. = = (define-key sgml-mode-map (kbd "M-e") 'my-html-forward-sentence) This didn't go. An error told me that I don't have the path (to psgml). I haven't been able to figure that one out yet. Thanks again, ken