mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 04:10:54 -08:00
(forward-sentence): Avoid building
a regexp from sentence-end. From Kenichi Handa <handa@etl.go.jp>.
This commit is contained in:
parent
6c233cc083
commit
ea2c64784d
2 changed files with 9 additions and 4 deletions
|
|
@ -1,5 +1,8 @@
|
|||
2001-08-07 Gerd Moellmann <gerd@gnu.org>
|
||||
|
||||
* textmodes/paragraphs.el (forward-sentence): Avoid building
|
||||
a regexp from sentence-end. From Kenichi Handa <handa@etl.go.jp>.
|
||||
|
||||
* progmodes/executable.el (executable-set-magic): If
|
||||
executable-find returns a quoted file name, unquote it before
|
||||
inserting it.
|
||||
|
|
|
|||
|
|
@ -369,10 +369,12 @@ sentences. Also, every paragraph boundary terminates sentences as well."
|
|||
(or arg (setq arg 1))
|
||||
(let ((opoint (point)))
|
||||
(while (< arg 0)
|
||||
(let ((par-beg (save-excursion (start-of-paragraph-text) (point))))
|
||||
(if (re-search-backward (concat "\\(" sentence-end "\\)[^ \t\n]")
|
||||
par-beg t)
|
||||
(goto-char (1- (match-end 0)))
|
||||
(let ((pos (point))
|
||||
(par-beg (save-excursion (start-of-paragraph-text) (point))))
|
||||
(if (and (re-search-backward sentence-end par-beg t)
|
||||
(or (< (match-end 0) pos)
|
||||
(re-search-backward sentence-end par-beg t)))
|
||||
(goto-char (match-end 0))
|
||||
(goto-char par-beg)))
|
||||
(setq arg (1+ arg)))
|
||||
(while (> arg 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue