596 |
;; doing this on load. That since `add-to-list' prepends the value |
;; doing this on load. That since `add-to-list' prepends the value |
597 |
;; which could cause it to clobber user settings. Later emacsen have |
;; which could cause it to clobber user settings. Later emacsen have |
598 |
;; an append option, but it's not safe to use. |
;; an append option, but it's not safe to use. |
599 |
|
|
600 |
|
;; The the extension ".C" is associated to C++ while the lowercase |
601 |
|
;; variant goes to C. On case insensitive file systems, this means |
602 |
|
;; that ".c" files also might open C++ mode if the C++ entry comes |
603 |
|
;; first on `auto-mode-alist'. Thus we try to ensure that ".C" comes |
604 |
|
;; after ".c", and since `add-to-list' adds the entry first we have to |
605 |
|
;; add the ".C" entry first. |
606 |
|
;;;###autoload (add-to-list 'auto-mode-alist '("\\.\\(cc\\|hh\\)\\'" . c++-mode)) |
607 |
|
;;;###autoload (add-to-list 'auto-mode-alist '("\\.[ch]\\(pp\\|xx\\|\\+\\+\\)\\'" . c++-mode)) |
608 |
|
;;;###autoload (add-to-list 'auto-mode-alist '("\\.\\(CC?\\|HH?\\)\\'" . c++-mode)) |
609 |
|
|
610 |
;;;###autoload (add-to-list 'auto-mode-alist '("\\.[ch]\\'" . c-mode)) |
;;;###autoload (add-to-list 'auto-mode-alist '("\\.[ch]\\'" . c-mode)) |
611 |
|
|
612 |
;; NB: The following two associate yacc and lex files to C Mode, which |
;; NB: The following two associate yacc and lex files to C Mode, which |
624 |
To submit a problem report, enter `\\[c-submit-bug-report]' from a |
To submit a problem report, enter `\\[c-submit-bug-report]' from a |
625 |
c-mode buffer. This automatically sets up a mail buffer with version |
c-mode buffer. This automatically sets up a mail buffer with version |
626 |
information already added. You just need to add a description of the |
information already added. You just need to add a description of the |
627 |
problem, including a reproducible test case and send the message. |
problem, including a reproducible test case, and send the message. |
628 |
|
|
629 |
To see what version of CC Mode you are running, enter `\\[c-version]'. |
To see what version of CC Mode you are running, enter `\\[c-version]'. |
630 |
|
|
681 |
(easy-menu-define c-c++-menu c++-mode-map "C++ Mode Commands" |
(easy-menu-define c-c++-menu c++-mode-map "C++ Mode Commands" |
682 |
(cons "C++" (c-lang-const c-mode-menu c++))) |
(cons "C++" (c-lang-const c-mode-menu c++))) |
683 |
|
|
|
;;;###autoload (add-to-list 'auto-mode-alist '("\\.\\(cc\\|hh\\)\\'" . c++-mode)) |
|
|
;;;###autoload (add-to-list 'auto-mode-alist '("\\.[ch]\\(pp\\|xx\\|\\+\\+\\)\\'" . c++-mode)) |
|
|
;;;###autoload (add-to-list 'auto-mode-alist '("\\.\\(CC?\\|HH?\\)\\'" . c++-mode)) |
|
|
|
|
684 |
;;;###autoload |
;;;###autoload |
685 |
(defun c++-mode () |
(defun c++-mode () |
686 |
"Major mode for editing C++ code. |
"Major mode for editing C++ code. |
823 |
To submit a problem report, enter `\\[c-submit-bug-report]' from a |
To submit a problem report, enter `\\[c-submit-bug-report]' from a |
824 |
java-mode buffer. This automatically sets up a mail buffer with |
java-mode buffer. This automatically sets up a mail buffer with |
825 |
version information already added. You just need to add a description |
version information already added. You just need to add a description |
826 |
of the problem, including a reproducible test case and send the |
of the problem, including a reproducible test case, and send the |
827 |
message. |
message. |
828 |
|
|
829 |
To see what version of CC Mode you are running, enter `\\[c-version]'. |
To see what version of CC Mode you are running, enter `\\[c-version]'. |
936 |
(easy-menu-define c-pike-menu pike-mode-map "Pike Mode Commands" |
(easy-menu-define c-pike-menu pike-mode-map "Pike Mode Commands" |
937 |
(cons "Pike" (c-lang-const c-mode-menu pike))) |
(cons "Pike" (c-lang-const c-mode-menu pike))) |
938 |
|
|
939 |
;;;###autoload (add-to-list 'auto-mode-alist '("\\.\\(pike\\|pmod\\(.in\\)?\\)\\'" . pike-mode)) |
;;;###autoload (add-to-list 'auto-mode-alist '("\\.\\(u?lpc\\|pike\\|pmod\\(.in\\)?\\)\\'" . pike-mode)) |
940 |
;;;###autoload (add-to-list 'interpreter-mode-alist '(("pike" . pike-mode))) |
;;;###autoload (add-to-list 'interpreter-mode-alist '("pike" . pike-mode)) |
941 |
|
|
942 |
;;;###autoload |
;;;###autoload |
943 |
(defun pike-mode () |
(defun pike-mode () |
976 |
;; Support for awk. This is purposely disabled for older (X)Emacsen which |
;; Support for awk. This is purposely disabled for older (X)Emacsen which |
977 |
;; don't support syntax-table properties. |
;; don't support syntax-table properties. |
978 |
|
|
979 |
(if (not (memq 'syntax-properties c-emacs-features)) |
;;;###autoload (add-to-list 'auto-mode-alist '("\\.awk\\'" . awk-mode)) |
980 |
(autoload 'awk-mode "awk-mode.el" "Major mode for editing AWK code. |
;;;###autoload (add-to-list 'interpreter-mode-alist '("awk" . awk-mode)) |
981 |
To submit a problem report, enter `\\[c-submit-bug-report]' from an |
;;;###autoload (add-to-list 'interpreter-mode-alist '("mawk" . awk-mode)) |
982 |
awk-mode buffer. This automatically sets up a mail buffer with version |
;;;###autoload (add-to-list 'interpreter-mode-alist '("nawk" . awk-mode)) |
983 |
information already added. You just need to add a description of the |
;;;###autoload (add-to-list 'interpreter-mode-alist '("gawk" . awk-mode)) |
984 |
problem, including a reproducible test case and send the message. |
|
985 |
|
;;; Autoload directives must be on the top level, so we construct an |
986 |
|
;;; autoload form instead. |
987 |
|
;;;###autoload (autoload 'awk-mode "cc-mode" "Major mode for editing AWK code.") |
988 |
|
|
989 |
To see what version of CC Mode you are running, enter `\\[c-version]'. |
(if (not (memq 'syntax-properties c-emacs-features)) |
990 |
|
(autoload 'awk-mode "awk-mode" "Major mode for editing AWK code." t) |
991 |
|
|
|
The hook `c-mode-common-hook' is run with no args at mode |
|
|
initialization, then `awk-mode-hook'. |
|
|
" t) |
|
992 |
(defvar awk-mode-abbrev-table nil |
(defvar awk-mode-abbrev-table nil |
993 |
"Abbreviation table used in awk-mode buffers.") |
"Abbreviation table used in awk-mode buffers.") |
994 |
(c-define-abbrev-table 'awk-mode-abbrev-table |
(c-define-abbrev-table 'awk-mode-abbrev-table |
1015 |
(easy-menu-define c-awk-menu awk-mode-map "AWK Mode Commands" |
(easy-menu-define c-awk-menu awk-mode-map "AWK Mode Commands" |
1016 |
(cons "AWK" (c-lang-const c-mode-menu awk))) |
(cons "AWK" (c-lang-const c-mode-menu awk))) |
1017 |
|
|
|
;; In XEmacs >= 21.5 modes should add their own entries to |
|
|
;; `auto-mode-alist' and `interpreter-mode-alist'. |
|
|
;;;###autoload (add-to-list 'auto-mode-alist '("\\.awk\\'" . awk-mode)) |
|
|
;;;###autoload (add-to-list 'interpreter-mode-alist '(("awk" . awk-mode) ("mawk" . awk-mode) ("nawk" . awk-mode) ("gawk" . awk-mode))) |
|
|
|
|
|
;;;###autoload |
|
1018 |
(defun awk-mode () |
(defun awk-mode () |
1019 |
"Major mode for editing AWK code. |
"Major mode for editing AWK code. |
1020 |
To submit a problem report, enter `\\[c-submit-bug-report]' from an |
To submit a problem report, enter `\\[c-submit-bug-report]' from an |
1021 |
awk-mode buffer. This automatically sets up a mail buffer with version |
awk-mode buffer. This automatically sets up a mail buffer with version |
1022 |
information already added. You just need to add a description of the |
information already added. You just need to add a description of the |
1023 |
problem, including a reproducible test case and send the message. |
problem, including a reproducible test case, and send the message. |
1024 |
|
|
1025 |
To see what version of CC Mode you are running, enter `\\[c-version]'. |
To see what version of CC Mode you are running, enter `\\[c-version]'. |
1026 |
|
|