Mercurial > hg > xemacs-beta
comparison lisp/cc-mode/cc-engine.el @ 183:e121b013d1f0 r20-3b18
Import from CVS: tag r20-3b18
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:54:23 +0200 |
parents | bfd6434d15b3 |
children | b405438285a2 |
comparison
equal
deleted
inserted
replaced
182:f07455f06202 | 183:e121b013d1f0 |
---|---|
5 ;; Authors: 1992-1997 Barry A. Warsaw | 5 ;; Authors: 1992-1997 Barry A. Warsaw |
6 ;; 1987 Dave Detlefs and Stewart Clamen | 6 ;; 1987 Dave Detlefs and Stewart Clamen |
7 ;; 1985 Richard M. Stallman | 7 ;; 1985 Richard M. Stallman |
8 ;; Maintainer: cc-mode-help@python.org | 8 ;; Maintainer: cc-mode-help@python.org |
9 ;; Created: 22-Apr-1997 (split from cc-mode.el) | 9 ;; Created: 22-Apr-1997 (split from cc-mode.el) |
10 ;; Version: 5.15 | 10 ;; Version: 5.16 |
11 ;; Keywords: c languages oop | 11 ;; Keywords: c languages oop |
12 | 12 |
13 ;; This file is part of GNU Emacs. | 13 ;; This file is part of GNU Emacs. |
14 | 14 |
15 ;; GNU Emacs is free software; you can redistribute it and/or modify | 15 ;; GNU Emacs is free software; you can redistribute it and/or modify |
169 ;; we always do want to skip over non-whitespace modifier | 169 ;; we always do want to skip over non-whitespace modifier |
170 ;; characters that didn't get skipped above | 170 ;; characters that didn't get skipped above |
171 (skip-chars-backward "-+!*&:.~" (c-point 'boi)))) | 171 (skip-chars-backward "-+!*&:.~" (c-point 'boi)))) |
172 | 172 |
173 (defun c-end-of-statement-1 () | 173 (defun c-end-of-statement-1 () |
174 (condition-case () | 174 (condition-case nil |
175 (progn | 175 (let (beg end found) |
176 (while (and (not (eobp)) | 176 (while (and (not (eobp)) |
177 (let ((beg (point))) | 177 (progn |
178 (setq beg (point)) | |
178 (forward-sexp 1) | 179 (forward-sexp 1) |
179 (let ((end (point))) | 180 (setq end (point)) |
180 (save-excursion | 181 (goto-char beg) |
181 (goto-char beg) | 182 (setq found nil) |
182 (not (re-search-forward "[;{}]" end t))))))) | 183 (while (and (not found) |
183 (re-search-backward "[;}]") | 184 (re-search-forward "[;{}]" end t)) |
185 (if (not (c-in-literal beg)) | |
186 (setq found t))) | |
187 (not found))) | |
188 (goto-char end)) | |
189 (re-search-backward "[;{}]") | |
184 (forward-char 1)) | 190 (forward-char 1)) |
185 (error | 191 (error |
186 (let ((beg (point))) | 192 (let ((beg (point))) |
187 (backward-up-list -1) | 193 (backward-up-list -1) |
188 (let ((end (point))) | 194 (let ((end (point))) |