[Openmcl-devel] Another ILisp Question

Ram Krishnan rkris at kriyative.net
Sat Jun 7 07:07:32 PDT 2003


Here's a little elisp function that integrates with Safari.

;; ----
(defun browse-url-mac-safari (url &optional new-window)
   (interactive)
   (let ((script (concat "tell application \"Safari\"\n"
                         "activate\n"
                         (if new-window
                             "open location \"%s\"\n"
                           "set URL of the first document to \"%s\"\n")
                         "end tell\n")))
     (do-applescript
      (format script url))))

(setq browse-url-browser-function 'browse-url-mac-safari)
;; ----

Personally, I find it much more convenient to browse the hyperspec 
using W3 inside of Emacs. It hints at what a really well integrated 
Lisp environment (such as a Lispm) would have been like.

Regards,

-ram

On Friday, June 6, 2003, at 11:20 PM, Sven Van Caekenberghe wrote:

> On Friday, June 6, 2003, at 04:54 PM, Dave Newman wrote:
>
>> What does one need to put into the .ilisp file to get ILisp (and 
>> OpenMCL) to browse the Hyperspec?
>>
>> Here's what I have...
>>
>> ;;;###autoload
>> (defun browse-url-os-x (url &optional new-window)
>>   "Ask the default OS X WWW browser to load URL.
>> Default to the URL around or before point."
>>
>> (apply #'start-process `(concat "open" url)))
>>
>> ;;; To use default OS X browser when not running under X11:
>> (or (eq window-system 'x)
>>     (setq browse-url-browser-function 'browse-url-os-x))
>>
>> ;;; Configuration of Erik Naggum's HyperSpec access package.
>>
>> ;; If you have a local copy of the HyperSpec, set its path here.
>>  (setq common-lisp-hyperspec-root
>>        "file:///Library/hyperspec")
>>  (setq common-lisp-hyperspec-symbol-table
>>        "/Library/hyperspec/Data/Map_Sym.Txt")
>>
>>
>> --Dave
>
> This is what I have (going via applescript seems somewhat faster):
>
> ;; hyperspec lookup setup
>
> (setq common-lisp-hyperspec-root
>       (expand-file-name "~/docs/CommonLispHyperSpec/"))
>
> (setq common-lisp-hyperspec-root
>       (concat "file://" common-lisp-hyperspec-root))
>
> (setq common-lisp-hyperspec-symbol-table
>       (expand-file-name "~/docs/CommonLispHyperSpec/Data/Map_Sym.txt"))
>
> (setq browse-url-browser-function
>       '(lambda (url &optional new-win)
>          (do-applescript (concat "open location \"" url "\""))))
>
>
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/cgi-bin/mailman/listinfo/openmcl-devel


_______________________________________________
Openmcl-devel mailing list
Openmcl-devel at clozure.com
http://clozure.com/cgi-bin/mailman/listinfo/openmcl-devel



More information about the Openmcl-devel mailing list