Mercurial > emacs
comparison lisp/progmodes/cc-cmds.el @ 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 | a0a1222030c8 |
children | 0bcb1aa03dad 2fcaae6177a5 |
comparison
equal
deleted
inserted
replaced
87172:b8b9765bb434 | 87173:4c81c0b94f32 |
---|---|
3862 ;; doesn't and "foo*/" doesn't. | 3862 ;; doesn't and "foo*/" doesn't. |
3863 (unless | 3863 (unless |
3864 (save-excursion | 3864 (save-excursion |
3865 (goto-char (cdr c-lit-limits)) | 3865 (goto-char (cdr c-lit-limits)) |
3866 (beginning-of-line) | 3866 (beginning-of-line) |
3867 (and (search-forward-regexp | 3867 ;; The following conjunct was added to avoid an |
3868 ;; "Invalid search bound (wrong side of point)" | |
3869 ;; error in the subsequent re-search. Maybe | |
3870 ;; another fix would be needed (2007-12-08). | |
3871 (and (> (- (cdr c-lit-limits) 2) (point)) | |
3872 (search-forward-regexp | |
3868 (concat "\\=[ \t]*\\(" c-current-comment-prefix "\\)") | 3873 (concat "\\=[ \t]*\\(" c-current-comment-prefix "\\)") |
3869 (- (cdr c-lit-limits) 2) t) | 3874 (- (cdr c-lit-limits) 2) t) |
3870 (not (search-forward-regexp | 3875 (not (search-forward-regexp |
3871 "\\(\\s \\|\\sw\\)" | 3876 "\\(\\s \\|\\sw\\)" |
3872 (- (cdr c-lit-limits) 2) 'limit)) | 3877 (- (cdr c-lit-limits) 2) 'limit)) |