Mercurial > hg > xemacs-beta
comparison lisp/modes/cc-mode.el @ 118:7d55a9ba150c r20-1b11
Import from CVS: tag r20-1b11
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:24:17 +0200 |
parents | 9f59509498e1 |
children | cca96a509cfe |
comparison
equal
deleted
inserted
replaced
117:578fd4947a72 | 118:7d55a9ba150c |
---|---|
4 | 4 |
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 ;; Created: a long, long, time ago. adapted from the original c-mode.el | 8 ;; Created: a long, long, time ago. adapted from the original c-mode.el |
9 ;; Version: 4.388 | 9 ;; Version: 4.390 |
10 ;; Last Modified: 1997/03/25 03:19:17 | 10 ;; Last Modified: 1997/04/02 15:46:35 |
11 ;; Keywords: c languages oop | 11 ;; Keywords: c languages oop |
12 | 12 |
13 ;; NOTE: Read the commentary below for the right way to submit bug reports! | 13 ;; NOTE: Read the commentary below for the right way to submit bug reports! |
14 ;; NOTE: See the accompanying texinfo manual for details on using this mode! | 14 ;; NOTE: See the accompanying texinfo manual for details on using this mode! |
15 | 15 |
2446 (setq c-indentation-style stylename) | 2446 (setq c-indentation-style stylename) |
2447 (if (not (string= stylename "cc-mode")) | 2447 (if (not (string= stylename "cc-mode")) |
2448 (c-set-style-1 vars))) | 2448 (c-set-style-1 vars))) |
2449 (c-keep-region-active)) | 2449 (c-keep-region-active)) |
2450 | 2450 |
2451 ;;;###autoload | |
2451 (defun c-add-style (style descrip &optional set-p) | 2452 (defun c-add-style (style descrip &optional set-p) |
2452 "Adds a style to `c-style-alist', or updates an existing one. | 2453 "Adds a style to `c-style-alist', or updates an existing one. |
2453 STYLE is a string identifying the style to add or update. DESCRIP is | 2454 STYLE is a string identifying the style to add or update. DESCRIP is |
2454 an association list describing the style and must be of the form: | 2455 an association list describing the style and must be of the form: |
2455 | 2456 |
4139 ((or (not (c-safe (forward-sexp -1) t)) | 4140 ((or (not (c-safe (forward-sexp -1) t)) |
4140 (<= (point) fence)) | 4141 (<= (point) fence)) |
4141 (setq done t)) | 4142 (setq done t)) |
4142 ) | 4143 ) |
4143 (setq cont t))) | 4144 (setq cont t))) |
4144 injava-inher)) | 4145 injava-inher) |
4145 ) | 4146 (not (c-crosses-statement-barrier-p (cdr injava-inher) |
4147 (point))) | |
4148 )) | |
4146 (cond | 4149 (cond |
4147 ;; CASE 5C.1: non-hanging colon on an inher intro | 4150 ;; CASE 5C.1: non-hanging colon on an inher intro |
4148 ((= char-after-ip ?:) | 4151 ((= char-after-ip ?:) |
4149 (c-backward-syntactic-ws lim) | 4152 (c-backward-syntactic-ws lim) |
4150 (c-add-syntax 'inher-intro (c-point 'boi)) | 4153 (c-add-syntax 'inher-intro (c-point 'boi)) |
5201 (progn (skip-chars-backward " \t") (point))))))) | 5204 (progn (skip-chars-backward " \t") (point))))))) |
5202 | 5205 |
5203 | 5206 |
5204 ;; defuns for submitting bug reports | 5207 ;; defuns for submitting bug reports |
5205 | 5208 |
5206 (defconst c-version "4.388" | 5209 (defconst c-version "4.390" |
5207 "CC Mode version number.") | 5210 "CC Mode version number.") |
5208 (defconst c-mode-help-address | 5211 (defconst c-mode-help-address |
5209 "bug-gnu-emacs@prep.ai.mit.edu, cc-mode-help@python.org" | 5212 "bug-gnu-emacs@prep.ai.mit.edu, cc-mode-help@python.org" |
5210 "Address for CC Mode bug reports.") | 5213 "Address for CC Mode bug reports.") |
5211 | 5214 |