Skip to content

Commit

Permalink
racket-browse-url-function: Vary default by platform; closes #620
Browse files Browse the repository at this point in the history
  • Loading branch information
greghendershott committed Mar 1, 2024
1 parent 5e9412a commit f803fa1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions racket-custom.el
Expand Up @@ -31,6 +31,7 @@
(define-obsolete-variable-alias 'racket-racket-program 'racket-program "2017-06-02")
(define-obsolete-variable-alias 'racket-raco-program 'racket-program "2017-06-02")

(defvar racket--macp (eq 'darwin system-type))
(defvar racket--winp (eq 'windows-nt system-type))

(defcustom racket-program (if racket--winp "Racket.exe" "racket")
Expand Down Expand Up @@ -65,8 +66,13 @@ their response asychronously."
(make-obsolete-variable 'racket-path-from-racket-to-emacs-function nil "2020-08-26")

(defcustom racket-browse-url-function
'racket-browse-url-using-temporary-file
"Function to call to browse a URL."
(if racket--macp
'racket-browse-url-using-temporary-file
'browse-url)
"Function to call to browse a URL.
Defaults to `racket-browse-url-using-temporary-file' on macOS and
`browse-url' on other platforms."
:tag "Browse URL Function"
:type 'function
:risky t
Expand Down

0 comments on commit f803fa1

Please sign in to comment.