From: Martin Rudalics Date: Sat, 8 Dec 2007 09:55:50 +0000 (+0000) Subject: (c-mask-paragraph): Avoid invalid search X-Git-Tag: emacs-pretest-23.0.90~9017 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=dc56b2ba139f0052c032ff7628ad40c83621740a;p=emacs.git (c-mask-paragraph): Avoid invalid search bound error in block comment branch. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 30be1ca0886..7608273c9bf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-12-08 Martin Rudalics + + * progmodes/cc-cmds.el (c-mask-paragraph): Avoid invalid search + bound error in block comment branch. + 2007-12-08 David Kastrup * textmodes/reftex.el (reftex-select-with-char): diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index db052c4b8f5..06c0946290b 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el @@ -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