diff lisp/progmodes/cc-cmds.el @ 91239:2fcaae6177a5

Merge from emacs--devo--0 Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-300
author Miles Bader <miles@gnu.org>
date Sun, 16 Dec 2007 05:08:49 +0000
parents d38543a1c0f9 4c81c0b94f32
children 56a72e2bd635
line wrap: on
line diff
--- a/lisp/progmodes/cc-cmds.el	Fri Dec 14 12:53:04 2007 +0000
+++ b/lisp/progmodes/cc-cmds.el	Sun Dec 16 05:08:49 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