help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What's a better regexp for 'sentence-end' variable??


From: gebser
Subject: Re: What's a better regexp for 'sentence-end' variable??
Date: Fri, 21 Feb 2003 14:46:00 -0500

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




reply via email to

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