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: Fri, 21 Feb 2003 14:46:00 -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 1045857769 8697 80.91.224.249 (21 Feb 2003 20:02:49 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 21 Feb 2003 20:02:49 +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 18mJN4-0002Dn-00 for ; Fri, 21 Feb 2003 21:02:10 +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 18mJLJ-000062-06 for gnu-help-gnu-emacs@m.gmane.org; Fri, 21 Feb 2003 15:00:21 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.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-209-47.dsl.bcvloh.ameritech.net Original-X-Trace: quimby.gnus.org 1045857628 2539 65.43.209.47 (21 Feb 2003 20:00:28 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 21 Feb 2003 20:00:28 GMT In-Reply-To: Original-Xref: shelby.stanford.edu gnu.emacs.help:110502 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:7004 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:7004 You got it! At 19:53 (UTC+0100) on Fri, 21 Feb 2003 Oliver Scholz said: = gebser@ameritech.net writes: = [...] = > = > ;; Doesn't work. 3 = > ;(eval-after-load 'sgml-mode = > ; (define-key sgml-mode-map (kbd "M-e") 'my-html-forward-sentence)) = ^^^ = = [I think, that should be ...'(define-key ... (Note the quote.)] That fixed it! Works as expected now. Very good eye! = [...] = Hmm, I am not familiar with all those SGML/HTML/XML-editing-mode. Is = `html-helper-mode' a package different from psgml? Maybe there is an = `html-helper-mode-map'? Not that I've been able to find (using "C-h a html-helper-mode-map" and other things). = = >> [...] = = I would use the same technique again: = = (defun my-html-backward-sentence () = (interactive) = (save-match-data = (if (re-search-backward ">\\([[:alpha:]\\s-*]\\|[.?!]\\)" nil t) = (goto-char (match-beginning 1)) ; then: go to beginning of = ; subexpression 1. = (goto-char (point-min))))) ; else: go to point-min. = = Hint: If you want to construct regexps for Emacs Lisp, M-x re-builder = makes this easy. It provides visual feedback on the regexp you are = constructing in the buffer, subexpressions included. I'll have a go at this later. I've got to spend a little more time on doing real (paying) work. Oliver, Thanks again for everything... very much appreciated. You're magic. ken