comparison lisp/modes/cc-mode.el @ 74:54cc21c15cbb r20-0b32

Import from CVS: tag r20-0b32
author cvs
date Mon, 13 Aug 2007 09:04:33 +0200
parents 131b0175ea99
children c7528f8e288d
comparison
equal deleted inserted replaced
73:e2d7a37b7c8d 74:54cc21c15cbb
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."