Skip to content

Commit

Permalink
Update hyperspec.lisp for Issue-33
Browse files Browse the repository at this point in the history
and added (defvar *use-external-browser* nil) for future IDE configuration option.
  • Loading branch information
Luis-Cervantes committed Jul 16, 2018
1 parent 51e5da9 commit e60aa9c
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions Sys/hyperspec.lisp
Expand Up @@ -22,6 +22,8 @@

(defvar *hyperspec-internet-path* "www.lispworks.com/documentation/HyperSpec/")

(defvar *use-external-browser* nil)

(defun win::install-hyperspec () #| place holder |#)

(defun hyperspec (sym)
Expand All @@ -46,15 +48,16 @@
(hyperspec-ref (getf doc-list ':hyperspec))
(path (if *hyperspec-local-path*
*hyperspec-local-path*
*hyperspec-internet-path*)))
*hyperspec-internet-path*))
(url (concatenate 'string
(when *hyperspec-local-path* "file:///") ; intriguingly needed for some browsers (at least Chrome and Firefox).
(namestring path)
"Body/"
hyperspec-ref
(if (= *hyperspec-version* 4) ".html" ""))))
(if hyperspec-ref
(cl::display-url
(concatenate 'string
(namestring path)
"Body/"
hyperspec-ref
(if (= *hyperspec-version* 4) ".html" "")))
(error "The symbol ~A does not have a hyperspec location registered" sym))))
(if *use-external-browser* (win::shell-execute url "") (cl::display-url url))
(error "The symbol ~A does not have a hyperspec location registered" sym))))


(defvar hyperspec-refs
Expand Down

0 comments on commit e60aa9c

Please sign in to comment.