Skip to content

Commit

Permalink
Add racket-images-do-not-use-svg customization; closes #709
Browse files Browse the repository at this point in the history
  • Loading branch information
greghendershott committed May 14, 2024
1 parent 0be7ba9 commit d2cff2b
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/generate.el
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@
racket-imagemagick-props
racket-images-keep-last
racket-images-system-viewer
racket-images-do-not-use-svg
racket-pretty-print
racket-repl-command-file
"Other variables"
Expand Down
11 changes: 11 additions & 0 deletions doc/racket-mode.texi
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ REPL variables
* racket-imagemagick-props::
* racket-images-keep-last::
* racket-images-system-viewer::
* racket-images-do-not-use-svg::
* racket-pretty-print::
* racket-repl-command-file::
Expand Down Expand Up @@ -3319,6 +3320,7 @@ Use some of the regexp search-based fontification from classic
* racket-imagemagick-props::
* racket-images-keep-last::
* racket-images-system-viewer::
* racket-images-do-not-use-svg::
* racket-pretty-print::
* racket-repl-command-file::
@end menu
Expand Down Expand Up @@ -3413,6 +3415,15 @@ How many images to keep in the image cache.

The image viewer program to use for @code{racket-view-image}.

@node racket-images-do-not-use-svg
@subsection racket-images-do-not-use-svg

Do not use SVG to render images?

Note: This value is used only when starting a back end -- @emph{not}
for each run. If you change this, for it to take effect you must
restart by using @code{racket-start-back-end}.

@node racket-pretty-print
@subsection racket-pretty-print

Expand Down
3 changes: 2 additions & 1 deletion racket-cmd.el
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ Before doing anything runs the hook `racket-stop-back-end-hook'."
(if local-p
racket--rkt-source-dir
(racket--ensure-updated-back-end-on-remote))))
(svg-flag (if (and (boundp 'image-types)
(svg-flag (if (and (not racket-images-do-not-use-svg)
(boundp 'image-types)
(fboundp 'image-type-available-p)
(or (and (memq 'svg image-types)
(image-type-available-p 'svg))
Expand Down
9 changes: 9 additions & 0 deletions racket-custom.el
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,15 @@ pixels, supply (:max-width 500)."
:type 'string
:risky t)

(defcustom racket-images-do-not-use-svg nil
"Do not use SVG to render images?
Note: This value is used only when starting a back end -- /not/
for each run. If you change this, for it to take effect you must
restart by using `racket-start-back-end'."
:type 'boolean
:safe #'booleanp)

(defcustom racket-pretty-print t
"Use pretty-print instead of print in REPL?"
:type 'boolean
Expand Down

0 comments on commit d2cff2b

Please sign in to comment.