satyr (owner)

Revisions

gist: 186012 Download_button fork
public
Public Clone URL: git://gist.github.com/186012.git
Embed All Files: show embed
ubiquity-mozrepl.lisp #
1
2
3
4
5
6
7
8
9
10
11
12
13
(defun moz-exec (code)
  (with-open-stream (mozrepl (connect "localhost" 4242))
    (read-line mozrepl nil)
    (princ code mozrepl)
    (while (read-char-no-hang mozrepl nil))))
 
(defun run-ubiquity (in) (interactive "sUbiquity: ")
  (moz-exec (concat "with(opener||self){minimize();restore();"
                    (format nil "gUbiquity.preview('~{\\u~4,'0X~}');"
                            (map 'list 'char-unicode in))
                    "focus()}\n")))
(global-set-key #\C-\, 'run-ubiquity)