Created
September 12, 2009 23:51
-
-
Save satyr/186012 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment