From 3f0c84cd0468eabb9c81dcbc2b717c47a3dbb700 Mon Sep 17 00:00:00 2001 From: Sahas Subramanian Date: Sun, 7 Dec 2025 18:28:42 +0100 Subject: [PATCH 1/3] Add error handling section to function reference --- src/builtin/mod.rs | 8 ++++++++ 1 file changed, 8 insertions(+) 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. From c8c09d71874d00e9e46ea8e55b2afdc51ce86c4b Mon Sep 17 00:00:00 2001 From: Sahas Subramanian Date: Sun, 7 Dec 2025 18:29:03 +0100 Subject: [PATCH 2/3] Improve catch/throw test to verify body evaluation --- src/builtin/functions/errors.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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))", From e80f41195b8aff42ecb7964c49b411115b4a5e05 Mon Sep 17 00:00:00 2001 From: Sahas Subramanian Date: Sun, 7 Dec 2025 18:32:24 +0100 Subject: [PATCH 3/3] Bump minimum rust version to 1.88.0 --- Cargo.toml | 1 + README.md | 2 +- src/lib.rs | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) 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/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: */