diff options
| author | Gerd Moellmann | 2000-07-24 11:11:01 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-07-24 11:11:01 +0000 |
| commit | e29cacf2d11d0e10fdec4d56604cbb7572d4e5b0 (patch) | |
| tree | dee8cb7b06b96e7990c11a1a9157b7093e4b7011 | |
| parent | 91b807c9ffaf11f5934a5473c5ccb2c7bf3b9e9c (diff) | |
| download | emacs-e29cacf2d11d0e10fdec4d56604cbb7572d4e5b0.tar.gz emacs-e29cacf2d11d0e10fdec4d56604cbb7572d4e5b0.zip | |
(c-append-paragraph-start): New variable used by
c-common-init to get paragraph-start correct.
(c-common-init): Use c-append-paragraph-start to
initialize paragraph-start to make it correct both with and
without the javadoc special case.
(c-Pike-inexpr-class-key): New
constant, since "class" can introduce an in-expression class
in Pike nowadays.
(c-Java-javadoc-paragraph-start): Brought
up-to-date with javadoc 1.2.
(c-common-init): Handling of obsolete variables
moved to c-initialize-cc-mode. More compatible style override
when using global style variables.
| -rw-r--r-- | lisp/progmodes/cc-langs.el | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 255ce7420e2..f881177f65f 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el | |||
| @@ -1,8 +1,9 @@ | |||
| 1 | ;;; cc-langs.el --- specific language support for CC Mode | 1 | ;;; cc-langs.el --- specific language support for CC Mode |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985,1987,1992-1999 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1985,1987,1992-2000 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Authors: 1998-1999 Barry A. Warsaw and Martin Stjernholm | 5 | ;; Authors: 2000- Martin Stjernholm |
| 6 | ;; 1998-1999 Barry A. Warsaw and Martin Stjernholm | ||
| 6 | ;; 1992-1997 Barry A. Warsaw | 7 | ;; 1992-1997 Barry A. Warsaw |
| 7 | ;; 1987 Dave Detlefs and Stewart Clamen | 8 | ;; 1987 Dave Detlefs and Stewart Clamen |
| 8 | ;; 1985 Richard M. Stallman | 9 | ;; 1985 Richard M. Stallman |
| @@ -213,9 +214,15 @@ Otherwise, this variable is nil. I.e. this variable is non-nil for | |||
| 213 | (defconst c-Java-defun-prompt-regexp | 214 | (defconst c-Java-defun-prompt-regexp |
| 214 | "^[ \t]*\\(\\(\\(public\\|protected\\|private\\|const\\|abstract\\|synchronized\\|final\\|static\\|threadsafe\\|transient\\|native\\|volatile\\)\\s-+\\)*\\(\\(\\([[a-zA-Z][][_$.a-zA-Z0-9]*[][_$.a-zA-Z0-9]+\\|[[a-zA-Z]\\)\\s-*\\)\\s-+\\)\\)?\\(\\([[a-zA-Z][][_$.a-zA-Z0-9]*\\s-+\\)\\s-*\\)?\\([_a-zA-Z][^][ \t:;.,{}()=]*\\|\\([_$a-zA-Z][_$.a-zA-Z0-9]*\\)\\)\\s-*\\(([^);{}]*)\\)?\\([] \t]*\\)\\(\\s-*\\<throws\\>\\s-*\\(\\([_$a-zA-Z][_$.a-zA-Z0-9]*\\)[, \t\n\r\f]*\\)+\\)?\\s-*") | 215 | "^[ \t]*\\(\\(\\(public\\|protected\\|private\\|const\\|abstract\\|synchronized\\|final\\|static\\|threadsafe\\|transient\\|native\\|volatile\\)\\s-+\\)*\\(\\(\\([[a-zA-Z][][_$.a-zA-Z0-9]*[][_$.a-zA-Z0-9]+\\|[[a-zA-Z]\\)\\s-*\\)\\s-+\\)\\)?\\(\\([[a-zA-Z][][_$.a-zA-Z0-9]*\\s-+\\)\\s-*\\)?\\([_a-zA-Z][^][ \t:;.,{}()=]*\\|\\([_$a-zA-Z][_$.a-zA-Z0-9]*\\)\\)\\s-*\\(([^);{}]*)\\)?\\([] \t]*\\)\\(\\s-*\\<throws\\>\\s-*\\(\\([_$a-zA-Z][_$.a-zA-Z0-9]*\\)[, \t\n\r\f]*\\)+\\)?\\s-*") |
| 215 | 216 | ||
| 216 | ;; Regexp describing Javadoc markup that always starts paragraphs. | 217 | ;; Regexp describing regexp to append to paragraph-start |
| 218 | (defvar c-append-paragraph-start "$") | ||
| 219 | (make-variable-buffer-local 'c-append-paragraph-start) | ||
| 217 | (defconst c-Java-javadoc-paragraph-start | 220 | (defconst c-Java-javadoc-paragraph-start |
| 218 | "@\\(author\\|exception\\|param\\|return\\|see\\|throws\\|version\\)") | 221 | (concat "\\(" |
| 222 | "@\\(author\\|deprecated\\|exception\\|param\\|return\\|" | ||
| 223 | "s\\(e\\(e\\|rial\\(\\|Data\\|Field\\)\\)\\|ince\\)\\|" | ||
| 224 | "throws\\|version\\)" | ||
| 225 | "\\|$\\)")) | ||
| 219 | 226 | ||
| 220 | ;; Regexp that starts lambda constructs. | 227 | ;; Regexp that starts lambda constructs. |
| 221 | (defvar c-lambda-key nil) | 228 | (defvar c-lambda-key nil) |
| @@ -231,6 +238,7 @@ Otherwise, this variable is nil. I.e. this variable is non-nil for | |||
| 231 | (defvar c-inexpr-class-key nil) | 238 | (defvar c-inexpr-class-key nil) |
| 232 | (make-variable-buffer-local 'c-inexpr-class-key) | 239 | (make-variable-buffer-local 'c-inexpr-class-key) |
| 233 | (defconst c-Java-inexpr-class-key "\\<new\\>") | 240 | (defconst c-Java-inexpr-class-key "\\<new\\>") |
| 241 | (defconst c-Pike-inexpr-class-key "\\<class\\>") | ||
| 234 | 242 | ||
| 235 | ;; List of open- and close-chars that makes up a pike-style brace | 243 | ;; List of open- and close-chars that makes up a pike-style brace |
| 236 | ;; list, ie for a `([ ])' list there should be a cons (?\[ . ?\]) in | 244 | ;; list, ie for a `([ ])' list there should be a cons (?\[ . ?\]) in |
| @@ -328,9 +336,13 @@ Otherwise, this variable is nil. I.e. this variable is non-nil for | |||
| 328 | ;; filladapt or some other fancy package. | 336 | ;; filladapt or some other fancy package. |
| 329 | (let ((comment-line-prefix | 337 | (let ((comment-line-prefix |
| 330 | (concat "[ \t]*\\(" c-comment-prefix-regexp "\\)?[ \t]*"))) | 338 | (concat "[ \t]*\\(" c-comment-prefix-regexp "\\)?[ \t]*"))) |
| 331 | (setq paragraph-start (concat comment-line-prefix "$\\|" | 339 | (setq paragraph-start (concat comment-line-prefix |
| 340 | c-append-paragraph-start | ||
| 341 | "\\|" | ||
| 332 | page-delimiter) | 342 | page-delimiter) |
| 333 | paragraph-separate paragraph-start | 343 | paragraph-separate (concat comment-line-prefix "$" |
| 344 | "\\|" | ||
| 345 | page-delimiter) | ||
| 334 | paragraph-ignore-fill-prefix t | 346 | paragraph-ignore-fill-prefix t |
| 335 | adaptive-fill-mode t | 347 | adaptive-fill-mode t |
| 336 | adaptive-fill-regexp | 348 | adaptive-fill-regexp |