# HG changeset patch # User Martin Rudalics # Date 1197107718 0 # Node ID 4c81c0b94f32f645f46e16f89bbf6ee05243214d # Parent b8b9765bb434bd776ee9659716160167878360dc (c-mask-paragraph): Avoid invalid search bound error in block comment branch. diff -r b8b9765bb434 -r 4c81c0b94f32 lisp/progmodes/cc-cmds.el --- 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