1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

(c-mask-paragraph): Avoid invalid search

bound error in block comment branch.
This commit is contained in:
Martin Rudalics 2007-12-08 09:55:50 +00:00
parent e10fe1cbe2
commit dc56b2ba13
2 changed files with 11 additions and 1 deletions

View file

@ -3864,7 +3864,12 @@ command to conveniently insert and align the necessary backslashes."
(save-excursion
(goto-char (cdr c-lit-limits))
(beginning-of-line)
(and (search-forward-regexp
;; The following conjunct was added to avoid an
;; "Invalid search bound (wrong side of point)"
;; error in the subsequent re-search. Maybe
;; another fix would be needed (2007-12-08).
(and (> (- (cdr c-lit-limits) 2) (point))
(search-forward-regexp
(concat "\\=[ \t]*\\(" c-current-comment-prefix "\\)")
(- (cdr c-lit-limits) 2) t)
(not (search-forward-regexp