diff options
| author | Richard M. Stallman | 1997-08-16 03:41:39 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-08-16 03:41:39 +0000 |
| commit | 07092cb12cd3f6dd53a050f586e98e76435ac1b8 (patch) | |
| tree | 500f1100c548f57d22012eaa8d4fe2e202f71f45 | |
| parent | f3bc6e682ee0ab49d8d169c3b19173312a3ed7e7 (diff) | |
| download | emacs-07092cb12cd3f6dd53a050f586e98e76435ac1b8.tar.gz emacs-07092cb12cd3f6dd53a050f586e98e76435ac1b8.zip | |
(c-buffer-is-cc-mode): Definition moved here from cc-vars.el.
Also, put permanent-local property on variable so it's value won't get
killed by kill-all-local-variables. This makes it easier for non-CC
Mode derived modes to be initialized correctly.
(c++-mode, java-mode, objc-mode, idl-mode):
Remove obsolete variable c-double-slash-is-comments-p.
| -rw-r--r-- | lisp/progmodes/cc-mode.el | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index cd38565480b..8ca97710bfd 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el | |||
| @@ -7,7 +7,7 @@ | |||
| 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: a long, long, time ago. adapted from the original c-mode.el | 9 | ;; Created: a long, long, time ago. adapted from the original c-mode.el |
| 10 | ;; Version: 5.15 | 10 | ;; Version: 5.16 |
| 11 | ;; Keywords: c languages oop | 11 | ;; Keywords: c languages oop |
| 12 | 12 | ||
| 13 | ;; NOTE: Read the commentary below for the right way to submit bug reports! | 13 | ;; NOTE: Read the commentary below for the right way to submit bug reports! |
| @@ -81,6 +81,15 @@ | |||
| 81 | (require 'cc-menus)) | 81 | (require 'cc-menus)) |
| 82 | (require 'cc-defs) | 82 | (require 'cc-defs) |
| 83 | 83 | ||
| 84 | (defvar c-buffer-is-cc-mode nil | ||
| 85 | "Non-nil for all buffers with a `major-mode' derived from CC Mode. | ||
| 86 | Otherwise, this variable is nil. I.e. this variable is non-nil for | ||
| 87 | `c-mode', `c++-mode', `objc-mode', `java-mode', `idl-mode', and any | ||
| 88 | other non-CC Mode mode that calls `c-initialize-cc-mode' | ||
| 89 | \(e.g. `awk-mode').") | ||
| 90 | (make-variable-buffer-local 'c-buffer-is-cc-mode) | ||
| 91 | (put 'c-buffer-is-cc-mode 'permanent-local t) | ||
| 92 | |||
| 84 | 93 | ||
| 85 | ;; Other modes and packages which depend on CC Mode should do the | 94 | ;; Other modes and packages which depend on CC Mode should do the |
| 86 | ;; following to make sure everything is loaded and available for their | 95 | ;; following to make sure everything is loaded and available for their |
| @@ -185,7 +194,6 @@ Key bindings: | |||
| 185 | c-comment-start-regexp c-C++-comment-start-regexp | 194 | c-comment-start-regexp c-C++-comment-start-regexp |
| 186 | c-class-key c-C++-class-key | 195 | c-class-key c-C++-class-key |
| 187 | c-access-key c-C++-access-key | 196 | c-access-key c-C++-access-key |
| 188 | c-double-slash-is-comments-p t | ||
| 189 | c-recognize-knr-p nil | 197 | c-recognize-knr-p nil |
| 190 | imenu-generic-expression cc-imenu-c++-generic-expression) | 198 | imenu-generic-expression cc-imenu-c++-generic-expression) |
| 191 | (run-hooks 'c-mode-common-hook) | 199 | (run-hooks 'c-mode-common-hook) |
| @@ -226,7 +234,6 @@ Key bindings: | |||
| 226 | c-class-key c-ObjC-class-key | 234 | c-class-key c-ObjC-class-key |
| 227 | c-baseclass-key nil | 235 | c-baseclass-key nil |
| 228 | c-access-key c-ObjC-access-key | 236 | c-access-key c-ObjC-access-key |
| 229 | c-double-slash-is-comments-p t | ||
| 230 | c-method-key c-ObjC-method-key) | 237 | c-method-key c-ObjC-method-key) |
| 231 | (run-hooks 'c-mode-common-hook) | 238 | (run-hooks 'c-mode-common-hook) |
| 232 | (run-hooks 'objc-mode-hook) | 239 | (run-hooks 'objc-mode-hook) |
| @@ -267,7 +274,6 @@ Key bindings: | |||
| 267 | c-comment-start-regexp c-Java-comment-start-regexp | 274 | c-comment-start-regexp c-Java-comment-start-regexp |
| 268 | c-class-key c-Java-class-key | 275 | c-class-key c-Java-class-key |
| 269 | c-method-key c-Java-method-key | 276 | c-method-key c-Java-method-key |
| 270 | c-double-slash-is-comments-p t | ||
| 271 | c-baseclass-key nil | 277 | c-baseclass-key nil |
| 272 | c-recognize-knr-p nil | 278 | c-recognize-knr-p nil |
| 273 | c-access-key c-Java-access-key | 279 | c-access-key c-Java-access-key |
| @@ -312,7 +318,6 @@ Key bindings: | |||
| 312 | c-comment-start-regexp c-C++-comment-start-regexp | 318 | c-comment-start-regexp c-C++-comment-start-regexp |
| 313 | c-class-key c-C++-class-key | 319 | c-class-key c-C++-class-key |
| 314 | c-access-key c-C++-access-key | 320 | c-access-key c-C++-access-key |
| 315 | c-double-slash-is-comments-p t | ||
| 316 | c-recognize-knr-p nil) | 321 | c-recognize-knr-p nil) |
| 317 | ;; imenu-generic-expression cc-imenu-c++-generic-expression) | 322 | ;; imenu-generic-expression cc-imenu-c++-generic-expression) |
| 318 | (run-hooks 'c-mode-common-hook) | 323 | (run-hooks 'c-mode-common-hook) |
| @@ -321,7 +326,7 @@ Key bindings: | |||
| 321 | 326 | ||
| 322 | 327 | ||
| 323 | ;; defuns for submitting bug reports | 328 | ;; defuns for submitting bug reports |
| 324 | (defconst c-version "5.15" | 329 | (defconst c-version "5.16" |
| 325 | "CC Mode version number.") | 330 | "CC Mode version number.") |
| 326 | 331 | ||
| 327 | (defconst c-mode-help-address | 332 | (defconst c-mode-help-address |