all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
[parent not found: <mailman.2220.1045823872.21513.help-gnu-emacs@gnu.org>]
[parent not found: <un0kr4229.fsf@ID-87814.user.dfncis.de>]
* What's a better regexp for 'sentence-end' variable??
@ 2003-02-18 13:16 gebser
  0 siblings, 0 replies; 18+ messages in thread
From: gebser @ 2003-02-18 13:16 UTC (permalink / raw)



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.</p>

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2003-02-22  1:14 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.2070.1045574190.21513.help-gnu-emacs@gnu.org>
2003-02-18 14:06 ` What's a better regexp for 'sentence-end' variable?? Oliver Scholz
2003-02-18 20:15   ` gebser
2003-02-18 22:32     ` David Kastrup
2003-02-19 15:38       ` Kai Großjohann
2003-02-19 15:44         ` David Kastrup
2003-02-19 16:26           ` Kai Großjohann
2003-02-18 22:54     ` Kevin Rodgers
2003-02-19 20:42       ` gebser
2003-02-19 18:41   ` gebser
     [not found] <mailman.2220.1045823872.21513.help-gnu-emacs@gnu.org>
2003-02-21 14:40 ` Stefan Monnier <foo@acm.com>
2003-02-21 14:55   ` gebser
2003-02-21 18:53 ` Oliver Scholz
2003-02-21 19:46   ` gebser
2003-02-21 20:56     ` Kai Großjohann
2003-02-22  1:14       ` gebser
2003-02-21 19:09 ` David Kastrup
     [not found] <un0kr4229.fsf@ID-87814.user.dfncis.de>
2003-02-21 10:37 ` gebser
2003-02-18 13:16 gebser

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.