summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/cc-fonts.el8
-rw-r--r--lisp/progmodes/cc-mode.el19
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'.")
;;; Doc comments.
-(defvar c-doc-line-join-re regexp-unmatchable)
-;; Matches a join of two lines in a doc comment.
+(cc-bytecomp-defvar c-doc-line-join-re)
+;; matches a join of two lines in a doc comment.
;; This should not be changed directly, but instead set by
;; `c-setup-doc-comment-style'. This variable is used in `c-find-decl-spots'
;; in (e.g.) autodoc style comments to bridge the gap between a "@\n" at an
;; EOL and the token following "//!" on the next line.
-(defvar c-doc-bright-comment-start-re regexp-unmatchable)
+(cc-bytecomp-defvar c-doc-bright-comment-start-re)
;; Matches the start of a "bright" comment, one whose contents may be
;; fontified by, e.g., `c-font-lock-declarations'.
-(defvar c-doc-line-join-end-ch nil)
+(cc-bytecomp-defvar c-doc-line-join-end-ch)
;; A list of characters, each being a last character of a doc comment marker,
;; e.g. the ! from pike autodoc's "//!".
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 @@
; '
(require 'cc-fonts) ;)
+;; The following three really belong to cc-fonts.el, but they are required
+;; even when cc-fonts.el hasn't been loaded (this happens in XEmacs when
+;; font-lock-mode is nil).
+
+(defvar c-doc-line-join-re regexp-unmatchable)
+;; Matches a join of two lines in a doc comment.
+;; This should not be changed directly, but instead set by
+;; `c-setup-doc-comment-style'. This variable is used in `c-find-decl-spots'
+;; in (e.g.) autodoc style comments to bridge the gap between a "@\n" at an
+;; EOL and the token following "//!" on the next line.
+
+(defvar c-doc-bright-comment-start-re regexp-unmatchable)
+;; Matches the start of a "bright" comment, one whose contents may be
+;; fontified by, e.g., `c-font-lock-declarations'.
+
+(defvar c-doc-line-join-end-ch nil)
+;; A list of characters, each being a last character of a doc comment marker,
+;; e.g. the ! from pike autodoc's "//!".
+
;; Other modes and packages which depend on CC Mode should do the
;; following to make sure everything is loaded and available for their