1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00

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.
This commit is contained in:
Alan Mackenzie 2019-06-17 20:22:06 +00:00
parent aed6e2f7c6
commit da6deda8d4
2 changed files with 23 additions and 4 deletions

View File

@ -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 "//!".

View File

@ -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