Elisp source construction for the Emacs adapter.
Every builder here now lives in hive-spi.editor.elisp: string in, elisp source out, no editor and no lifecycle. This namespace re-exports it so the addon's own call sites (and anything that requires hive-emacs.elisp) keep working unchanged.
Usage: (require '[hive-emacs.elisp :as el]) (el/require-and-call-json 'hive-mcp-magit 'hive-mcp-magit-api-status) (el/emit '(if (> x 0) "yes" "no"))
Elisp source construction for the Emacs adapter. Every builder here now lives in hive-spi.editor.elisp: string in, elisp source out, no editor and no lifecycle. This namespace re-exports it so the addon's own call sites (and anything that requires hive-emacs.elisp) keep working unchanged. Usage: (require '[hive-emacs.elisp :as el]) (el/require-and-call-json 'hive-mcp-magit 'hive-mcp-magit-api-status) (el/emit '(if (> x 0) "yes" "no"))
(elisp-quote v)Quote a Clojure value for elisp.
Strings get double-quoted, symbols get quoted, numbers pass through,
booleans become elisp's t / nil.
Quote a Clojure value for elisp. Strings get double-quoted, symbols get quoted, numbers pass through, booleans become elisp's `t` / `nil`.
(emit form)Compile a Clojure form to elisp source via clojure-elisp when present, falling back to pr-str.
Compile a Clojure form to elisp source via clojure-elisp when present, falling back to pr-str.
(emit-forms forms)Compile multiple forms to elisp source, joined by blank lines.
Compile multiple forms to elisp source, joined by blank lines.
(fboundp-call-json fn-sym & args)Generate elisp: check if function exists, call it, JSON-encode. Use when the feature is already required elsewhere.
Generate elisp: check if function exists, call it, JSON-encode. Use when the feature is already required elsewhere.
(format-args args)Format arguments for an elisp function call, leading space included.
Empty args produce the empty string so (fn) never becomes (fn ).
Format arguments for an elisp function call, leading space included. Empty args produce the empty string so `(fn)` never becomes `(fn )`.
(format-elisp template & args)Template-format elisp source.
Example: (format-elisp "(goto-line %d)" 42)
Template-format elisp source. Example: (format-elisp "(goto-line %d)" 42)
(require-and-call feature fn-sym & args)Generate elisp: require feature, call function, error if not available.
Generate elisp: require feature, call function, error if not available.
(require-and-call-json feature fn-sym & args)Generate elisp: require feature, call function, JSON-encode result.
Examples: (require-and-call-json 'hive-mcp-magit 'hive-mcp-magit-api-status) (require-and-call-json 'hive-mcp-magit 'hive-mcp-magit-api-log 10)
Generate elisp: require feature, call function, JSON-encode result. Examples: (require-and-call-json 'hive-mcp-magit 'hive-mcp-magit-api-status) (require-and-call-json 'hive-mcp-magit 'hive-mcp-magit-api-log 10)
(require-and-call-plist-json feature fn-sym params-map)Generate elisp: require feature, call function with a single plist arg, JSON-encode result.
PARAMS-MAP is a Clojure map converted to an elisp plist; nil values are omitted.
Generate elisp: require feature, call function with a single plist arg, JSON-encode result. PARAMS-MAP is a Clojure map converted to an elisp plist; nil values are omitted.
(require-and-call-text feature fn-sym & args)Generate elisp: require feature, call function, return as text.
Generate elisp: require feature, call function, return as text.
(wrap-progn & elisp-strs)Wrap elisp strings in a progn form.
Wrap elisp strings in a progn form.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |