annotate lisp/progmodes/cc-mode.el @ 25279:03cb8fb8ab28

(reftex-pop-to-bibtex-entry): Fixed conflict with pop-up-frames. (reftex-special-environment-parsers): New constant. (reftex-label-alist): car of an entry can also be a function. (reftex-what-special-env): new function. (reftex-label-location): Call `reftex-what-special-env'. (reftex-compile-variables): Check for symbol in `reftex-label-alist'. (reftex-what-environment): fixed bug with stacked environments of same kind (e.g. enumerate). (reftex-process-string): Preserve default directory. (reftex-label-alist-builtin): changed prefixes of endnote and footnote. Also the magic words. (reftex-reference): Interprete new option `reftex-fref-is-default'. (reftex-replace-prefix-escapes): Interprete new `%S' format. (reftex-toc-mouse-view-line): Command removed (had no binding). (reftex-everything-regexp): New function. (reftex-nearest-match): Made better. (reftex-toc-find-section): Use new version of `reftex-nearest-match'. (reftex-insert-docstruct): adapted to work with the index stuff. (reftex-parse-from-file): Find index entries as well. (reftex-toc-toggle-index): New function (reftex-toc-map): `i' is now used to togle the index, File boundaries has been moved to `F'. (reftex-select-label-map): Toggling display of file boundaries is now on the `F' key, for consistency with `reftex-toc-map'. (reftex-erase-all-selection-and-index-buffers): Renamed from `reftex-erase-all-selection-buffer'. Now also kills the index buffers. (reftex-viewing-cross-references): Customization group renamed from reftex-viewing-cross-references-and-citations. (reftex-index-macro-regexp, reftex-find-index-entry-regexp-format): New variables (reftex-macros-with-index): New variable (reftex-add-index-macros): New function (reftex-renumber-simple-labels, reftex-translate): Allow for multiple labels in a single ref command. (reftex-index-support): New customization group (reftex-support-index, reftex-index-special-chars, reftex-index-macros, reftex-index-default-macro, reftex-index-default-tag, reftex-index-math-format, reftex-index-section-letters, reftex-index-include-context, reftex-index-follow-mode, reftex-index-header-face, reftex-index-section-face, reftex-index-tag-face, reftex-index-face): New options (reftex-index-map, reftex-index-menu, reftex-last-index-file, reftex-index-tag, reftex-index-return-marker, reftex-index-restriction-indicator, reftex-index-restriction-data, reftex-index-macro-regexp, reftex-index-level-re, reftex-index-key-end-re, reftex-find-index-entry-regexp-format, reftex-everything-regexp-no-index, reftex-index-re, reftex-macros-with-index, reftex-index-macro-alist): New variables (reftex-index-help, reftex-index-macros-builtin, reftex-key-to-index-macro-alist, reftex-query-index-macro-prompt, reftex-query-index-macro-help): New constants (reftex-index-selection-or-word, reftex-index, reftex-default-index, reftex-update-default-index, reftex-index-complete-tag, reftex-index-select-tag, reftex-index-complete-key, reftex-index-update-taglist, reftex-index-globally, reftex-index-mode, reftex-index-show-entry, reftex-display-index, reftex-insert-index, reftex-index-insert-new-letter, reftex-get-restriction, reftex-index-pre-command-hook, reftex-index-post-command-hook, reftex-index-show-help, reftex-index-next, reftex-index-previous, reftex-index-toggle-follow, reftex-index-toggle-context, reftex-index-view-entry, reftex-index-goto-entry-and-hide, reftex-index-goto-entry, reftex-index-mouse-goto-line-and-hide, reftex-index-quit, reftex-index-quit-and-kill, reftex-index-goto-toc, reftex-index-rescan, reftex-index-Rescan, reftex-index-revert, reftex-index-switch-index-tag, reftex-index-restrict-to-section, reftex-index-widen, reftex-index-restriction-forward, reftex-index-restriction-backward, reftex-index-visit-location, reftex-index-analyze-entry, reftex-index-globalize, reftex-index-edit, reftex-index-toggle-range-beginning, reftex-index-toggle-range-end, reftex-index-edit-key, reftex-index-edit-attribute, reftex-index-edit-visual, reftex-index-edit-part, reftex-index-level-down, reftex-index-level-up, reftex-index-kill, reftex-index-undo, reftex-index-change-entry, reftex-index-goto-letter, reftex-add-index-macros, reftex-ensure-index-support, reftex-index-info-safe, reftex-index-info): New functions. Most of the code moved to other files.
author Carsten Dominik <dominik@science.uva.nl>
date Mon, 16 Aug 1999 07:38:41 +0000
parents 5b0864259a4b
children 03befb219d03
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1 ;;; cc-mode.el --- major mode for editing C, C++, Objective-C, and Java code
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2
20917
c6e2c4d9a305 (c-mode, c++-mode, objc-mode, java-mode): Set
Richard M. Stallman <rms@gnu.org>
parents: 20459
diff changeset
3 ;; Copyright (C) 1985,87,92,93,94,95,96,97,98 Free Software Foundation, Inc.
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
4
24282
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
5 ;; Authors: 1998 Barry A. Warsaw and Martin Stjernholm
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
6 ;; 1992-1997 Barry A. Warsaw
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
7 ;; 1987 Dave Detlefs and Stewart Clamen
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
8 ;; 1985 Richard M. Stallman
24282
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
9 ;; Maintainer: bug-cc-mode@gnu.org
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
10 ;; Created: a long, long, time ago. adapted from the original c-mode.el
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
11 ;; Keywords: c languages oop
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
12
24282
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
13 (defconst c-version "5.25"
20146
d7ea5d1fa91b (c-submit-bug-report): Remove
Karl Heuer <kwzh@gnu.org>
parents: 20135
diff changeset
14 "CC Mode version number.")
d7ea5d1fa91b (c-submit-bug-report): Remove
Karl Heuer <kwzh@gnu.org>
parents: 20135
diff changeset
15
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
16 ;; NOTE: Read the commentary below for the right way to submit bug reports!
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
17 ;; NOTE: See the accompanying texinfo manual for details on using this mode!
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
18
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
19 ;; This file is part of GNU Emacs.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
20
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
21 ;; GNU Emacs is free software; you can redistribute it and/or modify
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
22 ;; it under the terms of the GNU General Public License as published by
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
23 ;; the Free Software Foundation; either version 2, or (at your option)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
24 ;; any later version.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
25
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
26 ;; GNU Emacs is distributed in the hope that it will be useful,
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
27 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
28 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
29 ;; GNU General Public License for more details.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
30
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
31 ;; You should have received a copy of the GNU General Public License
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
32 ;; along with GNU Emacs; see the file COPYING. If not, write to the
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
33 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
34 ;; Boston, MA 02111-1307, USA.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
35
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
36 ;;; Commentary:
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
37
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
38 ;; This package provides GNU Emacs major modes for editing C, C++,
24282
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
39 ;; Objective-C, Java, IDL and Pike code. As of the latest Emacs and
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
40 ;; XEmacs releases, it is the default package for editing these
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
41 ;; languages. This package is called "CC Mode", and should be spelled
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
42 ;; exactly this way.
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
43
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
44 ;; CC Mode supports K&R and ANSI C, ANSI C++, Objective-C, Java,
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
45 ;; CORBA's IDL, and Pike with a consistent indentation model across
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
46 ;; all modes. This indentation model is intuitive and very flexible,
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
47 ;; so that almost any desired style of indentation can be supported.
19253
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
48 ;; Installation, usage, and programming details are contained in an
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
49 ;; accompanying texinfo manual.
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
50
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
51 ;; CC Mode's immediate ancestors were, c++-mode.el, cplus-md.el, and
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
52 ;; cplus-md1.el..
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
53
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
54 ;; NOTE: This mode does not perform font-locking (a.k.a syntactic
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
55 ;; coloring, keyword highlighting, etc.) for any of the supported
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
56 ;; modes. Typically this is done by a package called font-lock.el
24282
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
57 ;; which we do *not* maintain. You should contact the Emacs or XEmacs
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
58 ;; maintainers for questions about coloring or highlighting in any
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
59 ;; language mode.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
60
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
61 ;; To submit bug reports, type "C-c C-b". These will be sent to
24282
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
62 ;; bug-gnu-emacs@gnu.org (mirrored as the Usenet newsgroup
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
63 ;; gnu.emacs.bug) as well as bug-cc-mode@gnu.org, which directly
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
64 ;; contacts the CC Mode maintainers. Questions can sent to
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
65 ;; help-gnu-emacs@gnu.org (mirrored as gnu.emacs.help) and/or
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
66 ;; bug-cc-mode@gnu.org. The old CC Mode contact address,
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
67 ;; cc-mode-help@python.org is currently still active, but its use is
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
68 ;; discouraged. Please use bug-cc-mode@gnu.org instead. Please do
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
69 ;; not send bugs or questions to our personal accounts; we reserve the
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
70 ;; right to ignore such email!
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
71
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
72 ;; Many, many thanks go out to all the folks on the beta test list.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
73 ;; Without their patience, testing, insight, code contributions, and
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
74 ;; encouragement CC Mode would be a far inferior package.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
75
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
76 ;; You can get the latest version of CC Mode, including PostScript
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
77 ;; documentation and separate individual files from:
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
78 ;;
24282
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
79 ;; http://www.python.org/emacs/cc-mode/
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
80 ;;
24282
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
81 ;; You can join a moderated CC Mode announcement-only mailing list by
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
82 ;; visiting
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
83 ;;
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
84 ;; http://www.python.org/mailman/listinfo/cc-mode-announce
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
85
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
86 ;;; Code:
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
87
21109
a0eda86dd0be (c-initialize-cc-mode): Moved require's to top level.
Richard M. Stallman <rms@gnu.org>
parents: 20917
diff changeset
88
24282
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
89 (defvar c-buffer-is-cc-mode nil
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
90 "Non-nil for all buffers with a `major-mode' derived from CC Mode.
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
91 Otherwise, this variable is nil. I.e. this variable is non-nil for
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
92 `c-mode', `c++-mode', `objc-mode', `java-mode', `idl-mode',
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
93 `pike-mode', and any other non-CC Mode mode that calls
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
94 `c-initialize-cc-mode' (e.g. `awk-mode').")
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
95 (make-variable-buffer-local 'c-buffer-is-cc-mode)
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
96 (put 'c-buffer-is-cc-mode 'permanent-local t)
21109
a0eda86dd0be (c-initialize-cc-mode): Moved require's to top level.
Richard M. Stallman <rms@gnu.org>
parents: 20917
diff changeset
97
24282
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
98 (eval-and-compile
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
99 (require 'cc-defs))
21109
a0eda86dd0be (c-initialize-cc-mode): Moved require's to top level.
Richard M. Stallman <rms@gnu.org>
parents: 20917
diff changeset
100 (require 'cc-menus)
a0eda86dd0be (c-initialize-cc-mode): Moved require's to top level.
Richard M. Stallman <rms@gnu.org>
parents: 20917
diff changeset
101 (require 'cc-vars)
a0eda86dd0be (c-initialize-cc-mode): Moved require's to top level.
Richard M. Stallman <rms@gnu.org>
parents: 20917
diff changeset
102 (require 'cc-engine)
a0eda86dd0be (c-initialize-cc-mode): Moved require's to top level.
Richard M. Stallman <rms@gnu.org>
parents: 20917
diff changeset
103 (require 'cc-langs)
a0eda86dd0be (c-initialize-cc-mode): Moved require's to top level.
Richard M. Stallman <rms@gnu.org>
parents: 20917
diff changeset
104 (require 'cc-align)
a0eda86dd0be (c-initialize-cc-mode): Moved require's to top level.
Richard M. Stallman <rms@gnu.org>
parents: 20917
diff changeset
105 (require 'cc-styles)
a0eda86dd0be (c-initialize-cc-mode): Moved require's to top level.
Richard M. Stallman <rms@gnu.org>
parents: 20917
diff changeset
106 (require 'cc-cmds)
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
107
20917
c6e2c4d9a305 (c-mode, c++-mode, objc-mode, java-mode): Set
Richard M. Stallman <rms@gnu.org>
parents: 20459
diff changeset
108
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
109
18847
dd7615d21a97 (c-initialize-cc-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents: 18720
diff changeset
110 ;; Other modes and packages which depend on CC Mode should do the
dd7615d21a97 (c-initialize-cc-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents: 18720
diff changeset
111 ;; following to make sure everything is loaded and available for their
dd7615d21a97 (c-initialize-cc-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents: 18720
diff changeset
112 ;; use:
dd7615d21a97 (c-initialize-cc-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents: 18720
diff changeset
113 ;;
dd7615d21a97 (c-initialize-cc-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents: 18720
diff changeset
114 ;; (require 'cc-mode)
dd7615d21a97 (c-initialize-cc-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents: 18720
diff changeset
115 ;; (c-initialize-cc-mode)
dd7615d21a97 (c-initialize-cc-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents: 18720
diff changeset
116
19253
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
117 ;;;###autoload
24282
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
118 (defun c-initialize-cc-mode ()
19299
7cd7373cc021 (c-initialize-cc-mode): Set c-buffer-is-cc-mode to t.
Richard M. Stallman <rms@gnu.org>
parents: 19253
diff changeset
119 (setq c-buffer-is-cc-mode t)
24282
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
120 (let ((initprop 'cc-mode-is-initialized)
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
121 c-initialization-ok)
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
122 (unless (get 'c-initialize-cc-mode initprop)
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
123 (put 'c-initialize-cc-mode initprop t)
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
124 (c-initialize-builtin-style)
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
125 (unwind-protect
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
126 (progn
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
127 (run-hooks 'c-initialization-hook)
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
128 (setq c-initialization-ok t))
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
129 ;; Will try initialization hooks again if they failed.
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
130 (unless c-initialization-ok
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
131 (put 'c-initialize-cc-mode initprop nil))))
19253
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
132 ))
18847
dd7615d21a97 (c-initialize-cc-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents: 18720
diff changeset
133
dd7615d21a97 (c-initialize-cc-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents: 18720
diff changeset
134
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
135 ;;;###autoload
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
136 (defun c-mode ()
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
137 "Major mode for editing K&R and ANSI C code.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
138 To submit a problem report, enter `\\[c-submit-bug-report]' from a
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
139 c-mode buffer. This automatically sets up a mail buffer with version
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
140 information already added. You just need to add a description of the
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
141 problem, including a reproducible test case and send the message.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
142
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
143 To see what version of CC Mode you are running, enter `\\[c-version]'.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
144
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
145 The hook variable `c-mode-hook' is run with no args, if that value is
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
146 bound and has a non-nil value. Also the hook `c-mode-common-hook' is
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
147 run first.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
148
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
149 Key bindings:
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
150 \\{c-mode-map}"
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
151 (interactive)
18847
dd7615d21a97 (c-initialize-cc-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents: 18720
diff changeset
152 (c-initialize-cc-mode)
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
153 (kill-all-local-variables)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
154 (set-syntax-table c-mode-syntax-table)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
155 (setq major-mode 'c-mode
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
156 mode-name "C"
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
157 local-abbrev-table c-mode-abbrev-table)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
158 (use-local-map c-mode-map)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
159 (c-common-init)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
160 (setq comment-start "/* "
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
161 comment-end " */"
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
162 c-conditional-key c-C-conditional-key
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
163 c-class-key c-C-class-key
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
164 c-baseclass-key nil
19299
7cd7373cc021 (c-initialize-cc-mode): Set c-buffer-is-cc-mode to t.
Richard M. Stallman <rms@gnu.org>
parents: 19253
diff changeset
165 c-comment-start-regexp c-C++-comment-start-regexp
20459
90f306f86f5d Use imenu-case-fold-search.
Dave Love <fx@gnu.org>
parents: 20146
diff changeset
166 imenu-generic-expression cc-imenu-c-generic-expression
24282
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
167 imenu-case-fold-search nil
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
168 )
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
169 (run-hooks 'c-mode-common-hook)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
170 (run-hooks 'c-mode-hook)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
171 (c-update-modeline))
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
172
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
173
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
174 ;;;###autoload
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
175 (defun c++-mode ()
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
176 "Major mode for editing C++ code.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
177 To submit a problem report, enter `\\[c-submit-bug-report]' from a
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
178 c++-mode buffer. This automatically sets up a mail buffer with
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
179 version information already added. You just need to add a description
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
180 of the problem, including a reproducible test case, and send the
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
181 message.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
182
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
183 To see what version of CC Mode you are running, enter `\\[c-version]'.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
184
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
185 The hook variable `c++-mode-hook' is run with no args, if that
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
186 variable is bound and has a non-nil value. Also the hook
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
187 `c-mode-common-hook' is run first.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
188
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
189 Key bindings:
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
190 \\{c++-mode-map}"
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
191 (interactive)
18847
dd7615d21a97 (c-initialize-cc-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents: 18720
diff changeset
192 (c-initialize-cc-mode)
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
193 (kill-all-local-variables)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
194 (set-syntax-table c++-mode-syntax-table)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
195 (setq major-mode 'c++-mode
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
196 mode-name "C++"
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
197 local-abbrev-table c++-mode-abbrev-table)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
198 (use-local-map c++-mode-map)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
199 (c-common-init)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
200 (setq comment-start "// "
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
201 comment-end ""
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
202 c-conditional-key c-C++-conditional-key
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
203 c-comment-start-regexp c-C++-comment-start-regexp
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
204 c-class-key c-C++-class-key
24282
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
205 c-extra-toplevel-key c-C++-extra-toplevel-key
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
206 c-access-key c-C++-access-key
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
207 c-recognize-knr-p nil
20459
90f306f86f5d Use imenu-case-fold-search.
Dave Love <fx@gnu.org>
parents: 20146
diff changeset
208 imenu-generic-expression cc-imenu-c++-generic-expression
24282
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
209 imenu-case-fold-search nil
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
210 )
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
211 (run-hooks 'c-mode-common-hook)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
212 (run-hooks 'c++-mode-hook)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
213 (c-update-modeline))
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
214
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
215
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
216 ;;;###autoload
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
217 (defun objc-mode ()
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
218 "Major mode for editing Objective C code.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
219 To submit a problem report, enter `\\[c-submit-bug-report]' from an
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
220 objc-mode buffer. This automatically sets up a mail buffer with
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
221 version information already added. You just need to add a description
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
222 of the problem, including a reproducible test case, and send the
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
223 message.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
224
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
225 To see what version of CC Mode you are running, enter `\\[c-version]'.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
226
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
227 The hook variable `objc-mode-hook' is run with no args, if that value
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
228 is bound and has a non-nil value. Also the hook `c-mode-common-hook'
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
229 is run first.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
230
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
231 Key bindings:
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
232 \\{objc-mode-map}"
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
233 (interactive)
18847
dd7615d21a97 (c-initialize-cc-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents: 18720
diff changeset
234 (c-initialize-cc-mode)
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
235 (kill-all-local-variables)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
236 (set-syntax-table objc-mode-syntax-table)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
237 (setq major-mode 'objc-mode
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
238 mode-name "ObjC"
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
239 local-abbrev-table objc-mode-abbrev-table)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
240 (use-local-map objc-mode-map)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
241 (c-common-init)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
242 (setq comment-start "// "
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
243 comment-end ""
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
244 c-conditional-key c-C-conditional-key
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
245 c-comment-start-regexp c-C++-comment-start-regexp
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
246 c-class-key c-ObjC-class-key
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
247 c-baseclass-key nil
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
248 c-access-key c-ObjC-access-key
20135
ecb78a6ccd8d (objc-mode): Bind imenu-create-index-function
Karl Heuer <kwzh@gnu.org>
parents: 19808
diff changeset
249 c-method-key c-ObjC-method-key
20917
c6e2c4d9a305 (c-mode, c++-mode, objc-mode, java-mode): Set
Richard M. Stallman <rms@gnu.org>
parents: 20459
diff changeset
250 imenu-create-index-function 'cc-imenu-objc-function
c6e2c4d9a305 (c-mode, c++-mode, objc-mode, java-mode): Set
Richard M. Stallman <rms@gnu.org>
parents: 20459
diff changeset
251 imenu-case-fold-search nil
c6e2c4d9a305 (c-mode, c++-mode, objc-mode, java-mode): Set
Richard M. Stallman <rms@gnu.org>
parents: 20459
diff changeset
252 )
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
253 (run-hooks 'c-mode-common-hook)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
254 (run-hooks 'objc-mode-hook)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
255 (c-update-modeline))
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
256
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
257
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
258 ;;;###autoload
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
259 (defun java-mode ()
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
260 "Major mode for editing Java code.
20135
ecb78a6ccd8d (objc-mode): Bind imenu-create-index-function
Karl Heuer <kwzh@gnu.org>
parents: 19808
diff changeset
261 To submit a problem report, enter `\\[c-submit-bug-report]' from a
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
262 java-mode buffer. This automatically sets up a mail buffer with
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
263 version information already added. You just need to add a description
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
264 of the problem, including a reproducible test case and send the
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
265 message.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
266
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
267 To see what version of CC Mode you are running, enter `\\[c-version]'.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
268
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
269 The hook variable `java-mode-hook' is run with no args, if that value
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
270 is bound and has a non-nil value. Also the common hook
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
271 `c-mode-common-hook' is run first. Note that this mode automatically
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
272 sets the \"java\" style before calling any hooks so be careful if you
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
273 set styles in `c-mode-common-hook'.
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
274
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
275 Key bindings:
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
276 \\{java-mode-map}"
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
277 (interactive)
18847
dd7615d21a97 (c-initialize-cc-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents: 18720
diff changeset
278 (c-initialize-cc-mode)
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
279 (kill-all-local-variables)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
280 (set-syntax-table java-mode-syntax-table)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
281 (setq major-mode 'java-mode
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
282 mode-name "Java"
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
283 local-abbrev-table java-mode-abbrev-table)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
284 (use-local-map java-mode-map)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
285 (c-common-init)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
286 (setq comment-start "// "
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
287 comment-end ""
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
288 c-conditional-key c-Java-conditional-key
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
289 c-comment-start-regexp c-Java-comment-start-regexp
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
290 c-class-key c-Java-class-key
20917
c6e2c4d9a305 (c-mode, c++-mode, objc-mode, java-mode): Set
Richard M. Stallman <rms@gnu.org>
parents: 20459
diff changeset
291 c-method-key nil
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
292 c-baseclass-key nil
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
293 c-recognize-knr-p nil
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
294 c-access-key c-Java-access-key
24282
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
295 c-inexpr-class-key c-Java-inexpr-class-key
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
296 ;defun-prompt-regexp c-Java-defun-prompt-regexp
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
297 imenu-generic-expression cc-imenu-java-generic-expression
24282
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
298 imenu-case-fold-search nil
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
299 )
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
300 (run-hooks 'c-mode-common-hook)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
301 (run-hooks 'java-mode-hook)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
302 (c-update-modeline))
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
303
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
304
19253
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
305 ;;;###autoload
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
306 (defun idl-mode ()
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
307 "Major mode for editing CORBA's IDL code.
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
308 To submit a problem report, enter `\\[c-submit-bug-report]' from an
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
309 idl-mode buffer. This automatically sets up a mail buffer with
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
310 version information already added. You just need to add a description
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
311 of the problem, including a reproducible test case, and send the
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
312 message.
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
313
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
314 To see what version of CC Mode you are running, enter `\\[c-version]'.
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
315
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
316 The hook variable `idl-mode-hook' is run with no args, if that
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
317 variable is bound and has a non-nil value. Also the hook
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
318 `c-mode-common-hook' is run first.
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
319
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
320 Key bindings:
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
321 \\{idl-mode-map}"
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
322 (interactive)
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
323 (c-initialize-cc-mode)
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
324 (kill-all-local-variables)
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
325 (set-syntax-table idl-mode-syntax-table)
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
326 (setq major-mode 'idl-mode
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
327 mode-name "IDL"
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
328 local-abbrev-table idl-mode-abbrev-table)
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
329 (use-local-map idl-mode-map)
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
330 (c-common-init)
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
331 (setq comment-start "// "
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
332 comment-end ""
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
333 c-conditional-key c-C++-conditional-key
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
334 c-comment-start-regexp c-C++-comment-start-regexp
24282
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
335 c-class-key c-IDL-class-key
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
336 c-extra-toplevel-key c-IDL-extra-toplevel-key
19253
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
337 c-access-key c-C++-access-key
20917
c6e2c4d9a305 (c-mode, c++-mode, objc-mode, java-mode): Set
Richard M. Stallman <rms@gnu.org>
parents: 20459
diff changeset
338 c-recognize-knr-p nil
c6e2c4d9a305 (c-mode, c++-mode, objc-mode, java-mode): Set
Richard M. Stallman <rms@gnu.org>
parents: 20459
diff changeset
339 ;; imenu-generic-expression cc-imenu-c++-generic-expression
c6e2c4d9a305 (c-mode, c++-mode, objc-mode, java-mode): Set
Richard M. Stallman <rms@gnu.org>
parents: 20459
diff changeset
340 ;; imenu-case-fold-search nil
c6e2c4d9a305 (c-mode, c++-mode, objc-mode, java-mode): Set
Richard M. Stallman <rms@gnu.org>
parents: 20459
diff changeset
341 )
19253
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
342 (run-hooks 'c-mode-common-hook)
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
343 (run-hooks 'idl-mode-hook)
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
344 (c-update-modeline))
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
345
2bda7e07f25d (idl-mode): Support for CORBA's IDL language.
Richard M. Stallman <rms@gnu.org>
parents: 18847
diff changeset
346
24282
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
347 ;;;###autoload
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
348 (defun pike-mode ()
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
349 "Major mode for editing Pike code.
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
350 To submit a problem report, enter `\\[c-submit-bug-report]' from an
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
351 idl-mode buffer. This automatically sets up a mail buffer with
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
352 version information already added. You just need to add a description
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
353 of the problem, including a reproducible test case, and send the
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
354 message.
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
355
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
356 To see what version of CC Mode you are running, enter `\\[c-version]'.
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
357
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
358 The hook variable `pike-mode-hook' is run with no args, if that value
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
359 is bound and has a non-nil value. Also the common hook
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
360 `c-mode-common-hook' is run first.
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
361
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
362 Key bindings:
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
363 \\{pike-mode-map}"
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
364 (interactive)
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
365 (c-initialize-cc-mode)
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
366 (kill-all-local-variables)
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
367 (set-syntax-table pike-mode-syntax-table)
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
368 (setq major-mode 'pike-mode
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
369 mode-name "Pike"
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
370 local-abbrev-table pike-mode-abbrev-table)
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
371 (use-local-map pike-mode-map)
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
372 (c-common-init)
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
373 (setq comment-start "// "
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
374 comment-end ""
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
375 c-conditional-key c-Pike-conditional-key
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
376 c-class-key c-Pike-class-key
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
377 c-method-key nil
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
378 c-baseclass-key nil
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
379 c-recognize-knr-p nil
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
380 c-access-key c-Pike-access-key
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
381 c-lambda-key c-Pike-lambda-key
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
382 c-inexpr-block-key c-Pike-inexpr-block-key
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
383 c-special-brace-lists c-Pike-special-brace-lists
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
384 ;imenu-generic-expression cc-imenu-java-generic-expression ;FIXME
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
385 ;imenu-case-fold-search nil ;FIXME
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
386 )
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
387 (run-hooks 'c-mode-common-hook)
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
388 (run-hooks 'pike-mode-hook)
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
389 (c-update-modeline))
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
390
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
391
20146
d7ea5d1fa91b (c-submit-bug-report): Remove
Karl Heuer <kwzh@gnu.org>
parents: 20135
diff changeset
392 ;; bug reporting
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
393
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
394 (defconst c-mode-help-address
24282
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
395 "bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org"
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
396 "Addresses for CC Mode bug reports.")
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
397
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
398 (defun c-version ()
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
399 "Echo the current version of CC Mode in the minibuffer."
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
400 (interactive)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
401 (message "Using CC Mode version %s" c-version)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
402 (c-keep-region-active))
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
403
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
404 (defun c-submit-bug-report ()
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
405 "Submit via mail a bug report on CC Mode."
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
406 (interactive)
20917
c6e2c4d9a305 (c-mode, c++-mode, objc-mode, java-mode): Set
Richard M. Stallman <rms@gnu.org>
parents: 20459
diff changeset
407 (require 'reporter)
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
408 (require 'cc-vars)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
409 ;; load in reporter
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
410 (let ((reporter-prompt-for-summary-p t)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
411 (reporter-dont-compact-list '(c-offsets-alist))
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
412 (style c-indentation-style)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
413 (hook c-special-indent-hook)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
414 (c-features c-emacs-features))
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
415 (and
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
416 (if (y-or-n-p "Do you want to submit a report on CC Mode? ")
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
417 t (message "") nil)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
418 (require 'reporter)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
419 (reporter-submit-bug-report
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
420 c-mode-help-address
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
421 (concat "CC Mode " c-version " ("
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
422 (cond ((eq major-mode 'c++-mode) "C++")
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
423 ((eq major-mode 'c-mode) "C")
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
424 ((eq major-mode 'objc-mode) "ObjC")
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
425 ((eq major-mode 'java-mode) "Java")
24282
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
426 ((eq major-mode 'pike-mode) "Pike")
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
427 )
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
428 ")")
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
429 (let ((vars (list
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
430 ;; report only the vars that affect indentation
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
431 'c-basic-offset
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
432 'c-offsets-alist
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
433 'c-cleanup-list
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
434 'c-comment-only-line-offset
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
435 'c-backslash-column
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
436 'c-delete-function
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
437 'c-electric-pound-behavior
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
438 'c-hanging-braces-alist
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
439 'c-hanging-colons-alist
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
440 'c-hanging-comment-starter-p
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
441 'c-hanging-comment-ender-p
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
442 'c-indent-comments-syntactically-p
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
443 'c-tab-always-indent
20146
d7ea5d1fa91b (c-submit-bug-report): Remove
Karl Heuer <kwzh@gnu.org>
parents: 20135
diff changeset
444 'c-comment-continuation-stars
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
445 'c-label-minimum-indentation
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
446 'defun-prompt-regexp
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
447 'tab-width
24282
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
448 'comment-column
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
449 ;; A brain-damaged XEmacs only variable that, if
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
450 ;; set to nil can cause all kinds of chaos.
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
451 'signal-error-on-buffer-boundary
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
452 )))
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
453 (if (not (boundp 'defun-prompt-regexp))
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
454 (delq 'defun-prompt-regexp vars)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
455 vars))
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
456 (function
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
457 (lambda ()
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
458 (insert
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
459 "Buffer Style: " style "\n\n"
24282
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
460 (if (and hook
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
461 (or (/= (length hook) 1)
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
462 (not (eq (car hook) 'c-gnu-impose-minimum))
5b0864259a4b Installed CC Mode 5.25.
Barry A. Warsaw <barry@zope.org>
parents: 21109
diff changeset
463 ))
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
464 (concat "\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n"
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
465 "c-special-indent-hook is set to '"
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
466 (format "%s" hook)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
467 ".\nPerhaps this is your problem?\n"
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
468 "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n\n")
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
469 "\n")
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
470 (format "c-emacs-features: %s\n" c-features)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
471 )))
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
472 nil
21109
a0eda86dd0be (c-initialize-cc-mode): Moved require's to top level.
Richard M. Stallman <rms@gnu.org>
parents: 20917
diff changeset
473 "Dear Barry and Martin,"
18720
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
474 ))))
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
475
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
476
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
477 (provide 'cc-mode)
fc6d08b9bbe2 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
478 ;;; cc-mode.el ends here