Mercurial > hg > xemacs-beta
comparison lisp/cc-mode/cc-langs.el @ 177:6075d714658b r20-3b15
Import from CVS: tag r20-3b15
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:51:16 +0200 |
parents | 2d532a89d707 |
children | bfd6434d15b3 |
comparison
equal
deleted
inserted
replaced
176:6866abce6aaf | 177:6075d714658b |
---|---|
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 |
193 (defun c-use-java-style () | 193 (defun c-use-java-style () |
194 "Institutes `java' indentation style. | 194 "Institutes `java' indentation style. |
195 For use with the variable `java-mode-hook'." | 195 For use with the variable `java-mode-hook'." |
196 (c-set-style "java")) | 196 (c-set-style "java")) |
197 | 197 |
198 (defvar c-styles-are-initialized nil) | |
199 | |
200 (defun c-common-init () | 198 (defun c-common-init () |
201 ;; Common initializations for all modes. | 199 ;; Common initializations for all modes. |
202 (if c-styles-are-initialized | |
203 nil | |
204 (require 'cc-styles) | |
205 (c-initialize-builtin-style) | |
206 (if c-style-variables-are-local-p | |
207 (c-make-styles-buffer-local)) | |
208 (setq c-styles-are-initialized t)) | |
209 ;; these variables should always be buffer local; they do not affect | 200 ;; these variables should always be buffer local; they do not affect |
210 ;; indentation style. | 201 ;; indentation style. |
211 (make-local-variable 'paragraph-start) | 202 (make-local-variable 'paragraph-start) |
212 (make-local-variable 'paragraph-separate) | 203 (make-local-variable 'paragraph-separate) |
213 (make-local-variable 'paragraph-ignore-fill-prefix) | 204 (make-local-variable 'paragraph-ignore-fill-prefix) |
426 | 417 |
427 | 418 |
428 ;; Support for C | 419 ;; Support for C |
429 | 420 |
430 (defvar c-mode-abbrev-table nil | 421 (defvar c-mode-abbrev-table nil |
431 "Abbrev table in use in c-mode buffers.") | 422 "Abbreviation table used in c-mode buffers.") |
432 (define-abbrev-table 'c-mode-abbrev-table ()) | 423 (define-abbrev-table 'c-mode-abbrev-table ()) |
433 | 424 |
434 (defvar c-mode-map () | 425 (defvar c-mode-map () |
435 "Keymap used in c-mode buffers.") | 426 "Keymap used in c-mode buffers.") |
436 (if c-mode-map | 427 (if c-mode-map |
464 | 455 |
465 | 456 |
466 ;; Support for C++ | 457 ;; Support for C++ |
467 | 458 |
468 (defvar c++-mode-abbrev-table nil | 459 (defvar c++-mode-abbrev-table nil |
469 "Abbrev table in use in c++-mode buffers.") | 460 "Abbreviation table used in c++-mode buffers.") |
470 (define-abbrev-table 'c++-mode-abbrev-table ()) | 461 (define-abbrev-table 'c++-mode-abbrev-table ()) |
471 | 462 |
472 (defvar c++-mode-map () | 463 (defvar c++-mode-map () |
473 "Keymap used in c++-mode buffers.") | 464 "Keymap used in c++-mode buffers.") |
474 (if c++-mode-map | 465 (if c++-mode-map |
502 | 493 |
503 | 494 |
504 ;; Support for Objective-C | 495 ;; Support for Objective-C |
505 | 496 |
506 (defvar objc-mode-abbrev-table nil | 497 (defvar objc-mode-abbrev-table nil |
507 "Abbrev table in use in objc-mode buffers.") | 498 "Abbreviation table used in objc-mode buffers.") |
508 (define-abbrev-table 'objc-mode-abbrev-table ()) | 499 (define-abbrev-table 'objc-mode-abbrev-table ()) |
509 | 500 |
510 (defvar objc-mode-map () | 501 (defvar objc-mode-map () |
511 "Keymap used in objc-mode buffers.") | 502 "Keymap used in objc-mode buffers.") |
512 (if objc-mode-map | 503 (if objc-mode-map |
532 | 523 |
533 | 524 |
534 ;; Support for Java | 525 ;; Support for Java |
535 | 526 |
536 (defvar java-mode-abbrev-table nil | 527 (defvar java-mode-abbrev-table nil |
537 "Abbrev table in use in java-mode buffers.") | 528 "Abbreviation table used in java-mode buffers.") |
538 (define-abbrev-table 'java-mode-abbrev-table ()) | 529 (define-abbrev-table 'java-mode-abbrev-table ()) |
539 | 530 |
540 (defvar java-mode-map () | 531 (defvar java-mode-map () |
541 "Keymap used in java-mode buffers.") | 532 "Keymap used in java-mode buffers.") |
542 (if java-mode-map | 533 (if java-mode-map |
559 | 550 |
560 (easy-menu-define c-java-menu java-mode-map "Java Mode Commands" | 551 (easy-menu-define c-java-menu java-mode-map "Java Mode Commands" |
561 (c-mode-menu "Java")) | 552 (c-mode-menu "Java")) |
562 | 553 |
563 | 554 |
555 ;; Support for CORBA's IDL language | |
556 | |
557 (defvar idl-mode-abbrev-table nil | |
558 "Abbreviation table used in idl-mode buffers.") | |
559 (define-abbrev-table 'idl-mode-abbrev-table ()) | |
560 | |
561 (defvar idl-mode-map () | |
562 "Keymap used in idl-mode buffers.") | |
563 (if idl-mode-map | |
564 nil | |
565 (setq idl-mode-map (c-make-inherited-keymap)) | |
566 ;; additional bindings | |
567 (define-key idl-mode-map "/" 'c-electric-slash)) | |
568 | |
569 (defvar idl-mode-syntax-table nil | |
570 "Syntax table used in idl-mode buffers.") | |
571 (if idl-mode-syntax-table | |
572 nil | |
573 (setq idl-mode-syntax-table (make-syntax-table)) | |
574 (c-populate-syntax-table idl-mode-syntax-table) | |
575 ;; add extra comment syntax | |
576 (c-setup-dual-comments idl-mode-syntax-table) | |
577 ) | |
578 | |
579 (easy-menu-define c-idl-menu idl-mode-map "IDL Mode Commands" | |
580 (c-mode-menu "IDL")) | |
581 | |
582 | |
583 | |
564 (provide 'cc-langs) | 584 (provide 'cc-langs) |
565 ;;; cc-langs.el ends here | 585 ;;; cc-langs.el ends here |