all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Oliver Scholz <alkibiades@gmx.de>
Subject: Re: What's a better regexp for 'sentence-end' variable??
Date: Tue, 18 Feb 2003 15:06:13 +0100	[thread overview]
Message-ID: <uznotisyy.fsf@ID-87814.user.dfncis.de> (raw)
In-Reply-To: mailman.2070.1045574190.21513.help-gnu-emacs@gnu.org

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? ;-)

[...]
> 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.

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)))))

(define-key sgml-mode-map (kbd "M-e") 'my-html-forward-sentence)


    Oliver
-- 
30 Pluviôse an 211 de la Révolution
Liberté, Egalité, Fraternité!

       reply	other threads:[~2003-02-18 14:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.2070.1045574190.21513.help-gnu-emacs@gnu.org>
2003-02-18 14:06 ` Oliver Scholz [this message]
2003-02-18 20:15   ` What's a better regexp for 'sentence-end' variable?? 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=uznotisyy.fsf@ID-87814.user.dfncis.de \
    --to=alkibiades@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.