(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

@ -1,3 +1,8 @@
2007-12-08 Martin Rudalics <rudalics@gmx.at>
* progmodes/cc-cmds.el (c-mask-paragraph): Avoid invalid search
bound error in block comment branch.
2007-12-08 David Kastrup <dak@gnu.org>
* textmodes/reftex.el (reftex-select-with-char):

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