Skip to content

Instantly share code, notes, and snippets.

@legumbre
Created October 5, 2011 23:44
Show Gist options
  • Select an option

  • Save legumbre/1266087 to your computer and use it in GitHub Desktop.

Select an option

Save legumbre/1266087 to your computer and use it in GitHub Desktop.
/*
MozRepl setup for Conkeror and firefox-x11-devel-standalone
Reference:
http://conkeror.org/MozRepl -- Conkeror Wiki
https://github.com/bard/mozrepl/wiki -- MozRepl Wiki
https://github.com/bard/mozrepl/wiki/Use-with-Conkeror
*/
// 1. download [email protected] in ~/conkeror/extensions/
// 2. add to conkeror init file:
let (mozrepl_init = get_home_directory()) {
mozrepl_init.appendRelativePath(".mozrepl-conkeror.js");
session_pref('extensions.mozrepl.initUrl', make_uri(mozrepl_init).spec);
}
if ('@hyperstruct.net/mozlab/mozrepl;1' in Cc) {
var mozrepl = Cc['@hyperstruct.net/mozlab/mozrepl;1']
.getService(Ci.nsIMozRepl);
if (! mozrepl.isActive())
mozrepl.start(4242);
}
// 3. create ~/.mozrepl-conkeror.js with:
var conkeror = Cc["@conkeror.mozdev.org/application;1"] .getService().wrappedJSObject;
this.enter(conkeror);
// 4. download moz.el and set it up for js-mode (ex-espresso, default js-mode in 23.2)
;; js-mode and mozrepl
(autoload 'moz-minor-mode "moz" "Mozilla Minor and Inferior Mozilla Modes" t)
(add-hook 'js-mode-hook 'js-custom-setup)
(defun js-custom-setup ()
(moz-minor-mode 1))
// happy hacking!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment