Skip to content
Rust binding and tools for emacs-module (Emacs's dynamic module support)
Rust Emacs Lisp C PowerShell Shell CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.azure-pipelines
bin
emacs-macros
emacs-module
guide
rs-module
src
test-module
.gitignore
.rustfmt.toml
.travis.yml
CHANGELOG.md
Cargo.toml
README.md

README.md

Emacs Module in Rust crates.io doc.rs Build Status Build Status

User Guide | Change Log | Examples

This provides a high-level binding to emacs-module, Emacs's support for dynamic modules.

Code for a minimal module looks like this:

use emacs::{defun, Env, Result, Value};

emacs::plugin_is_GPL_compatible!();

#[emacs::module(name = "greeting")]
fn init(_: &Env) -> Result<()> { Ok(()) }

#[defun]
fn say_hello(env: &Env, name: String) -> Result<Value<'_>> {
    env.message(&format!("Hello, {}!", name))
}
(require 'greeting)
(greeting-say-hello "Emacs")

Example Modules

Development

  • Building:
    bin/build
  • Testing:
    bin/test
  • Continuous testing (requires cargo-watch):
    bin/test watch

On Windows, use PowerShell to run the corresponding .ps1 scripts.

You can’t perform that action at this time.