Crates.io | emacs |
lib.rs | emacs |
version | 0.19.0 |
source | src |
created_at | 2016-05-23 10:46:51.189001 |
updated_at | 2024-03-16 14:18:39.290449 |
description | Rust library for creating Emacs's dynamic modules |
homepage | https://github.com/ubolonton/emacs-module-rs |
repository | |
max_upload_size | |
id | 5155 |
size | 89,684 |
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")
bin/build
bin/test
cargo-watch
):
bin/test watch
On Windows, use PowerShell to run the corresponding .ps1
scripts.