diff options
| author | Alan Mackenzie | 2019-06-17 20:22:06 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2019-06-17 20:22:06 +0000 |
| commit | da6deda8d41c0a7ce4ddcc4b3569c7aa295238df (patch) | |
| tree | d67ce5b0fac03ef6ea68480a5514b27f4bb4dce3 | |
| parent | aed6e2f7c6517fd27589a9c618799c3deb88f96e (diff) | |
| download | emacs-da6deda8d41c0a7ce4ddcc4b3569c7aa295238df.tar.gz emacs-da6deda8d41c0a7ce4ddcc4b3569c7aa295238df.zip | |
Move defvars of c-doc-line-join-re + two others from cc-fonts.el to cc-mode.el
This is because these variables are needed at runtime even when cc-fonts.el
hasn't been loaded, as in XEmacs when font locking hasn't been enabled.
* lisp/progmodes/cc-fonts.el (c-doc-line-join-re)
(c-doc-bright-comment-start-re, c-doc-line-join-end-ch): Move definitions to
cc-mode.el.
| -rw-r--r-- | lisp/progmodes/cc-fonts.el | 8 | ||||
| -rw-r--r-- | lisp/progmodes/cc-mode.el | 19 |
2 files changed, 23 insertions, 4 deletions
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index 269d2c90b79..4e81b3b1e20 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el | |||
| @@ -2584,18 +2584,18 @@ need for `pike-font-lock-extra-types'.") | |||
| 2584 | 2584 | ||
| 2585 | ;;; Doc comments. | 2585 | ;;; Doc comments. |
| 2586 | 2586 | ||
| 2587 | (defvar c-doc-line-join-re regexp-unmatchable) | 2587 | (cc-bytecomp-defvar c-doc-line-join-re) |
| 2588 | ;; Matches a join of two lines in a doc comment. | 2588 | ;; matches a join of two lines in a doc comment. |
| 2589 | ;; This should not be changed directly, but instead set by | 2589 | ;; This should not be changed directly, but instead set by |
| 2590 | ;; `c-setup-doc-comment-style'. This variable is used in `c-find-decl-spots' | 2590 | ;; `c-setup-doc-comment-style'. This variable is used in `c-find-decl-spots' |
| 2591 | ;; in (e.g.) autodoc style comments to bridge the gap between a "@\n" at an | 2591 | ;; in (e.g.) autodoc style comments to bridge the gap between a "@\n" at an |
| 2592 | ;; EOL and the token following "//!" on the next line. | 2592 | ;; EOL and the token following "//!" on the next line. |
| 2593 | 2593 | ||
| 2594 | (defvar c-doc-bright-comment-start-re regexp-unmatchable) | 2594 | (cc-bytecomp-defvar c-doc-bright-comment-start-re) |
| 2595 | ;; Matches the start of a "bright" comment, one whose contents may be | 2595 | ;; Matches the start of a "bright" comment, one whose contents may be |
| 2596 | ;; fontified by, e.g., `c-font-lock-declarations'. | 2596 | ;; fontified by, e.g., `c-font-lock-declarations'. |
| 2597 | 2597 | ||
| 2598 | (defvar c-doc-line-join-end-ch nil) | 2598 | (cc-bytecomp-defvar c-doc-line-join-end-ch) |
| 2599 | ;; A list of characters, each being a last character of a doc comment marker, | 2599 | ;; A list of characters, each being a last character of a doc comment marker, |
| 2600 | ;; e.g. the ! from pike autodoc's "//!". | 2600 | ;; e.g. the ! from pike autodoc's "//!". |
| 2601 | 2601 | ||
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 5d0fda389ca..5c18879712c 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el | |||
| @@ -128,6 +128,25 @@ | |||
| 128 | ; ' | 128 | ; ' |
| 129 | (require 'cc-fonts) ;) | 129 | (require 'cc-fonts) ;) |
| 130 | 130 | ||
| 131 | ;; The following three really belong to cc-fonts.el, but they are required | ||
| 132 | ;; even when cc-fonts.el hasn't been loaded (this happens in XEmacs when | ||
| 133 | ;; font-lock-mode is nil). | ||
| 134 | |||
| 135 | (defvar c-doc-line-join-re regexp-unmatchable) | ||
| 136 | ;; Matches a join of two lines in a doc comment. | ||
| 137 | ;; This should not be changed directly, but instead set by | ||
| 138 | ;; `c-setup-doc-comment-style'. This variable is used in `c-find-decl-spots' | ||
| 139 | ;; in (e.g.) autodoc style comments to bridge the gap between a "@\n" at an | ||
| 140 | ;; EOL and the token following "//!" on the next line. | ||
| 141 | |||
| 142 | (defvar c-doc-bright-comment-start-re regexp-unmatchable) | ||
| 143 | ;; Matches the start of a "bright" comment, one whose contents may be | ||
| 144 | ;; fontified by, e.g., `c-font-lock-declarations'. | ||
| 145 | |||
| 146 | (defvar c-doc-line-join-end-ch nil) | ||
| 147 | ;; A list of characters, each being a last character of a doc comment marker, | ||
| 148 | ;; e.g. the ! from pike autodoc's "//!". | ||
| 149 | |||
| 131 | 150 | ||
| 132 | ;; Other modes and packages which depend on CC Mode should do the | 151 | ;; Other modes and packages which depend on CC Mode should do the |
| 133 | ;; following to make sure everything is loaded and available for their | 152 | ;; following to make sure everything is loaded and available for their |