How can I split my conkeror-rc config over multiple files?

Posted by Ryan Thompson on Stack Overflow See other posts from Stack Overflow or by Ryan Thompson
Published on 2010-05-14T06:11:12Z Indexed on 2010/05/14 6:14 UTC
Read the original article Hit count: 264

Short version: can you help me fill in this code?

var conkeror_settings_dir = ".conkeror.mozdev.org/settings";
function load_all_js_files_in_dir (dir) {
    var full_path = get_home_directory().appendRelativePath(dir);
    // YOUR CODE HERE
}
load_all_js_files_in_dir(conkeror_settings_dir);

Background

I'm trying out Conkeror for web browsing. It's an emacs-like browser running on Mozilla's rendering engine, using javascript as configuration language (filling the role that elisp plays for emacs). In my emacs config, I have split my customizations into a series of files, where each file is a single unit of related options (for example, all my perl-related settings might be in perl-settings.el. All these settings files are loaded automatically by a function in my .emacs that simply loads every elisp file under my "settings" directory.

I am looking to structure my Conkeror config in the same way, with my main conkeror-rc file basically being a stub that loads all the js files under a certain directory relative to my home directory. Unfortunately, I am much less literate in javascript than I am in elisp, so I don't even know how to "source" a file.

© Stack Overflow or respective owner

Related posts about conkeror

Related posts about configuration-files