comparison lisp/progmodes/cc-engine.el @ 19251:6a7d40ec4b29

(c-beginning-of-statement-1): When checking for bare semi, don't match on a semi following a close brace. (c-guess-basic-syntax): CASE 5I: When adding 'inclass syntax, use the relpos pointing to the class opening brace, unless that hangs on the right side, in which case, use the start of the class/struct keyword.
author Richard M. Stallman <rms@gnu.org>
date Sat, 09 Aug 1997 18:28:54 +0000
parents 6b269c4ad2eb
children c4d7dd15f7d5
comparison
equal deleted inserted replaced
19250:23f71af4d504 19251:6a7d40ec4b29
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.13 10 ;; Version: 5.14
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
55 (eq (char-before) ?\;)) 55 (eq (char-before) ?\;))
56 (c-safe (progn (forward-char -1) 56 (c-safe (progn (forward-char -1)
57 (setq saved (point)) 57 (setq saved (point))
58 t)) 58 t))
59 (progn (c-backward-syntactic-ws lim) 59 (progn (c-backward-syntactic-ws lim)
60 (memq (char-before) '(?\; ?{ ?} ?:))) 60 (memq (char-before) '(?\; ?{ ?:)))
61 ) 61 )
62 (setq last-begin saved) 62 (setq last-begin saved)
63 (goto-char last-begin) 63 (goto-char last-begin)
64 (while (not donep) 64 (while (not donep)
65 ;; stop at beginning of buffer 65 ;; stop at beginning of buffer
1247 (widen) 1247 (widen)
1248 (c-add-syntax 'topmost-intro (c-point 'bol)) 1248 (c-add-syntax 'topmost-intro (c-point 'bol))
1249 (if inclass-p 1249 (if inclass-p
1250 (progn 1250 (progn
1251 (goto-char (aref inclass-p 1)) 1251 (goto-char (aref inclass-p 1))
1252 (or (= (point) (c-point 'boi))
1253 (goto-char (aref inclass-p 0)))
1252 (if inextern-p 1254 (if inextern-p
1253 (c-add-syntax 'inextern-lang) 1255 (c-add-syntax 'inextern-lang)
1254 (c-add-syntax 'inclass (c-point 'boi))))) 1256 (c-add-syntax 'inclass (c-point 'boi)))))
1255 )) 1257 ))
1256 ;; CASE 5J: we are at an ObjC or Java method definition 1258 ;; CASE 5J: we are at an ObjC or Java method definition