diff --git a/Cargo.toml b/Cargo.toml index 7726016..fb4469c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,6 +7,7 @@ license = "GPL-3.0" edition = "2024" keywords = ["lisp", "scripting", "emacs-lisp"] categories = ["compilers", "config"] +rust-version = "1.88.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/README.md b/README.md index 15b855e..958cb10 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ already familiar with Emacs Lisp, there's no need to learn an extra language. ## Getting started -Tulisp requires `rustc` version 1.70 or higher. +Tulisp requires `rustc` version 1.88 or higher. It is very easy to get started. Here's an example: diff --git a/src/builtin/functions/errors.rs b/src/builtin/functions/errors.rs index 3560a70..9d11bc4 100644 --- a/src/builtin/functions/errors.rs +++ b/src/builtin/functions/errors.rs @@ -34,7 +34,11 @@ mod tests { #[test] fn test_error_handling() { let mut ctx = TulispContext::new(); - eval_assert_equal(&mut ctx, "(catch 'my-tag (throw 'my-tag 42))", "42"); + eval_assert_equal( + &mut ctx, + "(catch 'my-tag (setq x 42) (throw 'my-tag x))", + "42", + ); eval_assert_error( &mut ctx, "(catch 'my-tag (throw 'other-tag 42))", diff --git a/src/builtin/mod.rs b/src/builtin/mod.rs index fa1e8e8..36cd407 100644 --- a/src/builtin/mod.rs +++ b/src/builtin/mod.rs @@ -171,6 +171,14 @@ the unix epoch. | `sqrt` | ☑️ | | | `abs` | ☑️ | | +## Error handling + +| Name | Status | Details | +|--------------------------------------------------------------------------------------------------------|--------|---------| +| [`error`](https://www.gnu.org/software/emacs/manual/html_node/elisp/Signaling-Errors.html#index-error) | ☑️ | | +| [`throw`](https://www.gnu.org/software/emacs/manual/html_node/elisp/Catch-and-Throw.html#index-throw) | ☑️ | | +| [`catch`](https://www.gnu.org/software/emacs/manual/html_node/elisp/Catch-and-Throw.html#index-catch) | ☑️ | | + ## Others These functions need to be organized into categories. They are grouped here for now. diff --git a/src/lib.rs b/src/lib.rs index c5ce973..aee95a8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -10,7 +10,7 @@ already familiar with Emacs Lisp, there's no need to learn an extra language. ## Getting started -Tulisp requires `rustc` version 1.70 or higher. +Tulisp requires `rustc` version 1.88 or higher. It is very easy to get started. Here's an example: */