llm-tools.el

Opinionated tools for use by a (local) LLM
Log | Files | Refs | LICENSE

commit cb5d76b094bec8bbca84b4022cf352e78f4656a7
parent 62336cfba249c9bdd781d0789cc041f02f2aef0b
Author: Vineet Kumar <git@vineetk.net>
Date:   Tue, 26 May 2026 00:23:35 -0400

add lexical-binding to all files to prevent dynamic binding issues

this caused my tools not be defined when actually testing in a gptel
session

Diffstat:
Mllm-tools-hl-test.el | 1+
Mllm-tools-hl.el | 1+
Mllm-tools-web.el | 4++--
Mllm-tools.el | 1+
4 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/llm-tools-hl-test.el b/llm-tools-hl-test.el @@ -1,3 +1,4 @@ +;; -*- lexical-binding: t; -*- (require 'ert) (require 'llm-tools-hl) diff --git a/llm-tools-hl.el b/llm-tools-hl.el @@ -1,3 +1,4 @@ +;; -*- lexical-binding: t; -*- (defvar llm-tools--hl-bigrams (list "aa" "ab" "ac" "ad" "ae" "af" "ag" "ah" "ai" "aj" "ak" "al" "am" "an" "ao" "ap" "aq" "ar" "as" "at" "au" "av" "aw" "ax" "ay" "az" "ba" "bb" diff --git a/llm-tools-web.el b/llm-tools-web.el @@ -1,5 +1,5 @@ -;;; Web tools, taken from gptel-agent -(defun gptel-agent--fetch-with-timeout (url url-cb tool-cb failed-msg &rest args) +;;; Web tools, taken from gptel-agent -*- lexical-binding: t; -*- +(defun llm-tools--fetch-with-timeout (url url-cb tool-cb failed-msg &rest args) "Fetch URL and call URL-CB in the result buffer. Call TOOL-CB if there is an error or a timeout. TOOL-CB and ARGS are diff --git a/llm-tools.el b/llm-tools.el @@ -1,3 +1,4 @@ +;; -*- lexical-binding: t; -*- (require 'llm-tools-hl) (require 'llm-tools-web)