Mercurial > hg > xemacs-beta
comparison lisp/modes/cc-mode.el @ 6:27bc7f280385 r19-15b4
Import from CVS: tag r19-15b4
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:47:15 +0200 |
parents | b82b59fe008d |
children | bcdc7deadc19 |
comparison
equal
deleted
inserted
replaced
5:49b78a777eb4 | 6:27bc7f280385 |
---|---|
1155 ;; style variables are made buffer local at tail end of this file. | 1155 ;; style variables are made buffer local at tail end of this file. |
1156 | 1156 |
1157 ;; cmacexp is lame because it uses no preprocessor symbols. | 1157 ;; cmacexp is lame because it uses no preprocessor symbols. |
1158 ;; It isn't very extensible either -- hardcodes /lib/cpp. | 1158 ;; It isn't very extensible either -- hardcodes /lib/cpp. |
1159 ;; [I add it here only because c-mode has it -- BAW] | 1159 ;; [I add it here only because c-mode has it -- BAW] |
1160 ;(autoload 'c-macro-expand "cmacexp" | 1160 (autoload 'c-macro-expand "cmacexp" |
1161 ; "Display the result of expanding all C macros occurring in the region. | 1161 "Display the result of expanding all C macros occurring in the region. |
1162 ;The expansion is entirely correct because it uses the C preprocessor." | 1162 The expansion is entirely correct because it uses the C preprocessor." |
1163 ; t) | 1163 t) |
1164 | 1164 |
1165 | 1165 |
1166 ;; constant regular expressions for looking at various constructs | 1166 ;; constant regular expressions for looking at various constructs |
1167 (defconst c-C++-class-key "\\(class\\|struct\\|union\\)" | 1167 (defconst c-C++-class-key "\\(class\\|struct\\|union\\)" |
1168 "Regexp describing a C++ class declaration, including templates.") | 1168 "Regexp describing a C++ class declaration, including templates.") |
1259 | 1259 |
1260 | 1260 |
1261 ;; main entry points for the modes | 1261 ;; main entry points for the modes |
1262 (defconst c-list-of-mode-names nil) | 1262 (defconst c-list-of-mode-names nil) |
1263 | 1263 |
1264 ;;;###autoload | |
1264 (defun c-mode () | 1265 (defun c-mode () |
1265 "Major mode for editing K&R and ANSI C code. | 1266 "Major mode for editing K&R and ANSI C code. |
1266 To submit a problem report, enter `\\[c-submit-bug-report]' from a | 1267 To submit a problem report, enter `\\[c-submit-bug-report]' from a |
1267 c-mode buffer. This automatically sets up a mail buffer with version | 1268 c-mode buffer. This automatically sets up a mail buffer with version |
1268 information already added. You just need to add a description of the | 1269 information already added. You just need to add a description of the |
1294 imenu-generic-expression cc-imenu-c-generic-expression) | 1295 imenu-generic-expression cc-imenu-c-generic-expression) |
1295 (run-hooks 'c-mode-common-hook) | 1296 (run-hooks 'c-mode-common-hook) |
1296 (run-hooks 'c-mode-hook)) | 1297 (run-hooks 'c-mode-hook)) |
1297 (setq c-list-of-mode-names (cons "C" c-list-of-mode-names)) | 1298 (setq c-list-of-mode-names (cons "C" c-list-of-mode-names)) |
1298 | 1299 |
1300 ;;;###autoload | |
1299 (defun c++-mode () | 1301 (defun c++-mode () |
1300 "Major mode for editing C++ code. | 1302 "Major mode for editing C++ code. |
1301 To submit a problem report, enter `\\[c-submit-bug-report]' from a | 1303 To submit a problem report, enter `\\[c-submit-bug-report]' from a |
1302 c++-mode buffer. This automatically sets up a mail buffer with | 1304 c++-mode buffer. This automatically sets up a mail buffer with |
1303 version information already added. You just need to add a description | 1305 version information already added. You just need to add a description |
1332 imenu-generic-expression cc-imenu-c++-generic-expression) | 1334 imenu-generic-expression cc-imenu-c++-generic-expression) |
1333 (run-hooks 'c-mode-common-hook) | 1335 (run-hooks 'c-mode-common-hook) |
1334 (run-hooks 'c++-mode-hook)) | 1336 (run-hooks 'c++-mode-hook)) |
1335 (setq c-list-of-mode-names (cons "C++" c-list-of-mode-names)) | 1337 (setq c-list-of-mode-names (cons "C++" c-list-of-mode-names)) |
1336 | 1338 |
1339 ;;;###autoload | |
1337 (defun objc-mode () | 1340 (defun objc-mode () |
1338 "Major mode for editing Objective C code. | 1341 "Major mode for editing Objective C code. |
1339 To submit a problem report, enter `\\[c-submit-bug-report]' from an | 1342 To submit a problem report, enter `\\[c-submit-bug-report]' from an |
1340 objc-mode buffer. This automatically sets up a mail buffer with | 1343 objc-mode buffer. This automatically sets up a mail buffer with |
1341 version information already added. You just need to add a description | 1344 version information already added. You just need to add a description |
1370 c-method-key c-ObjC-method-key) | 1373 c-method-key c-ObjC-method-key) |
1371 (run-hooks 'c-mode-common-hook) | 1374 (run-hooks 'c-mode-common-hook) |
1372 (run-hooks 'objc-mode-hook)) | 1375 (run-hooks 'objc-mode-hook)) |
1373 (setq c-list-of-mode-names (cons "ObjC" c-list-of-mode-names)) | 1376 (setq c-list-of-mode-names (cons "ObjC" c-list-of-mode-names)) |
1374 | 1377 |
1378 ;;;###autoload | |
1375 (defun java-mode () | 1379 (defun java-mode () |
1376 "Major mode for editing Java code. | 1380 "Major mode for editing Java code. |
1377 To submit a problem report, enter `\\[c-submit-bug-report]' from an | 1381 To submit a problem report, enter `\\[c-submit-bug-report]' from an |
1378 java-mode buffer. This automatically sets up a mail buffer with | 1382 java-mode buffer. This automatically sets up a mail buffer with |
1379 version information already added. You just need to add a description | 1383 version information already added. You just need to add a description |
2330 (add-hook 'c-special-indent-hook val))) | 2334 (add-hook 'c-special-indent-hook val))) |
2331 (t (set attr val))) | 2335 (t (set attr val))) |
2332 ))) | 2336 ))) |
2333 stylevars)) | 2337 stylevars)) |
2334 | 2338 |
2339 ;;;###autoload | |
2335 (defun c-set-style (stylename) | 2340 (defun c-set-style (stylename) |
2336 "Set cc-mode variables to use one of several different indentation styles. | 2341 "Set cc-mode variables to use one of several different indentation styles. |
2337 STYLENAME is a string representing the desired style from the list of | 2342 STYLENAME is a string representing the desired style from the list of |
2338 styles described in the variable `c-style-alist'. See that variable | 2343 styles described in the variable `c-style-alist'. See that variable |
2339 for details of setting up styles." | 2344 for details of setting up styles." |