branch: elpa/racket-mode
commit 4cdbc1deb30c1625fadde762e55eb78c3acede53
Author: Greg Hendershott <g...@greghendershott.com>
Commit: Greg Hendershott <g...@greghendershott.com>

    Give text tokens a new racket-hash-lang-text face; closes #712
    
    Although this just inherits from the "default" face, the user may
    customize the appearance as with any other face. Furthermore as a
    distinct face it may help with configuring things like jinx, which is
    the motivation of the issue.
---
 doc/generate.el      | 3 ++-
 doc/racket-mode.texi | 9 ++++++++-
 racket-custom.el     | 6 +++++-
 racket-hash-lang.el  | 3 ++-
 4 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/doc/generate.el b/doc/generate.el
index b22ac77558..17a91e7b8f 100644
--- a/doc/generate.el
+++ b/doc/generate.el
@@ -280,7 +280,8 @@
     racket-repl-error-message
     racket-repl-error-location
     racket-repl-stdout
-    racket-repl-stderr)
+    racket-repl-stderr
+    racket-hash-lang-text)
   "Faces to include in the Reference.")
 
 (defun racket-generate--faces ()
diff --git a/doc/racket-mode.texi b/doc/racket-mode.texi
index cc83314bbe..ecde865a85 100644
--- a/doc/racket-mode.texi
+++ b/doc/racket-mode.texi
@@ -329,6 +329,7 @@ All
 * racket-repl-error-location::
 * racket-repl-stdout::
 * racket-repl-stderr::
+* racket-hash-lang-text::
 
 @end detailmenu
 @end menu
@@ -3201,7 +3202,7 @@ list: Comment tokens use the face 
@code{font-lock-comment-face},
 sometimes blended with other faces. Parenthesis tokens use the
 face @code{parenthesis} if defined, as by the paren-face package.
 String tokens use @code{font-lock-string-face}. Text tokens, e.g.
-Scribble text, use the face @code{default}
+Scribble text, use the face @ref{racket-hash-lang-text}.
 
 @node racket-hash-lang-pairs
 @subsection racket-hash-lang-pairs
@@ -4053,6 +4054,7 @@ A value for the variable 
@ref{racket-shell-or-terminal-function}.
 * racket-repl-error-location::
 * racket-repl-stdout::
 * racket-repl-stderr::
+* racket-hash-lang-text::
 @end menu
 
 @node racket-keyword-argument-face
@@ -4246,4 +4248,9 @@ Face @ref{racket-repl-mode} uses for output to 
current-output-port.
 
 Face @ref{racket-repl-mode} uses for output to current-error-port.
 
+@node racket-hash-lang-text
+@subsection racket-hash-lang-text
+
+Face @ref{racket-hash-lang-mode} uses for text tokens.
+
 @bye
\ No newline at end of file
diff --git a/racket-custom.el b/racket-custom.el
index f48b4b26fe..b5ceb888fa 100644
--- a/racket-custom.el
+++ b/racket-custom.el
@@ -190,7 +190,7 @@ list: Comment tokens use the face `font-lock-comment-face',
 sometimes blended with other faces. Parenthesis tokens use the
 face `parenthesis' if defined, as by the paren-face package.
 String tokens use `font-lock-string-face'. Text tokens, e.g.
-Scribble text, use the face `default'"
+Scribble text, use the face `racket-hash-lang-text'."
   :type '(alist :key-type symbol :value-type face)
   :safe #'listp)
 
@@ -771,6 +771,10 @@ See the variable `racket-browse-url-function'.")
   '((t (:inherit error)))
   "Face `racket-repl-mode' uses for output to current-error-port.")
 
+(defface-racket racket-hash-lang-text
+  '((t (:inherit default)))
+  "Face `racket-hash-lang-mode' uses for text tokens.")
+
 (provide 'racket-custom)
 
 ;;; racket-custom.el ends here
diff --git a/racket-hash-lang.el b/racket-hash-lang.el
index 9113947b00..4eb8d7ce05 100644
--- a/racket-hash-lang.el
+++ b/racket-hash-lang.el
@@ -559,7 +559,8 @@ that need be set."
                (put-face beg end (racket--sexp-comment-face (get-face-at 
beg))))
               ('parenthesis (when (facep 'parenthesis)
                               (put-face beg end 'parenthesis)))
-              ('text (put-stx beg end racket--plain-syntax-table))
+              ('text (put-stx beg end racket--plain-syntax-table)
+                     (put-face beg end racket-hash-lang-text))
               (kind
                (if-let (face (cdr (assq kind 
racket-hash-lang-token-face-alist)))
                    (put-face beg end face)

Reply via email to