Mercurial > emacs
changeset 87173:4c81c0b94f32
(c-mask-paragraph): Avoid invalid search
bound error in block comment branch.
author | Martin Rudalics <rudalics@gmx.at> |
---|---|
date | Sat, 08 Dec 2007 09:55:18 +0000 |
parents | b8b9765bb434 |
children | b042a563846d |
files | lisp/progmodes/cc-cmds.el |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/cc-cmds.el Sat Dec 08 01:39:15 2007 +0000 +++ b/lisp/progmodes/cc-cmds.el Sat Dec 08 09:55:18 2007 +0000 @@ -3864,7 +3864,12 @@ (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