1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-22 21:50:45 -08:00

For moving backward sentences,

distinguish start of paragraph from start of its text.
This commit is contained in:
Richard M. Stallman 2011-09-23 19:55:52 -04:00
parent 19c3875245
commit e488d29cec
2 changed files with 16 additions and 9 deletions

View file

@ -1,5 +1,8 @@
2011-09-23 Richard Stallman <rms@gnu.org> 2011-09-23 Richard Stallman <rms@gnu.org>
* textmodes/paragraphs.el (forward-sentence): For backwards case,
distinguish start of paragraph from start of its text.
* mail/emacsbug.el (report-emacs-bug-query-existing-bugs): Autoload. * mail/emacsbug.el (report-emacs-bug-query-existing-bugs): Autoload.
* mail/rmail.el (rmail-view-buffer-kill-buffer-hook): New function. * mail/rmail.el (rmail-view-buffer-kill-buffer-hook): New function.

View file

@ -456,19 +456,23 @@ sentences. Also, every paragraph boundary terminates sentences as well."
(sentence-end (sentence-end))) (sentence-end (sentence-end)))
(while (< arg 0) (while (< arg 0)
(let ((pos (point)) (let ((pos (point))
(par-beg par-beg par-text-beg)
(save-excursion (save-excursion
(start-of-paragraph-text) (start-of-paragraph-text)
;; Move PAR-BEG back over indentation ;; Start of real text in the paragraph.
;; We move back to here if we don't see a sentence-end.
(setq par-text-beg (point))
;; Start of the first line of the paragraph.
;; We use this as the search limit
;; to allow s1entence-end to match if it is anchored at ;; to allow s1entence-end to match if it is anchored at
;; BOL and the paragraph starts indented. ;; BOL and the paragraph starts indented.
(beginning-of-line) (beginning-of-line)
(point)))) (setq par-beg (point)))
(if (and (re-search-backward sentence-end par-beg t) (if (and (re-search-backward sentence-end par-beg t)
(or (< (match-end 0) pos) (or (< (match-end 0) pos)
(re-search-backward sentence-end par-beg t))) (re-search-backward sentence-end par-beg t)))
(goto-char (match-end 0)) (goto-char (match-end 0))
(goto-char par-beg))) (goto-char par-text-beg)))
(setq arg (1+ arg))) (setq arg (1+ arg)))
(while (> arg 0) (while (> arg 0)
(let ((par-end (save-excursion (end-of-paragraph-text) (point)))) (let ((par-end (save-excursion (end-of-paragraph-text) (point))))