[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/sweeprolog 5fa0e16ee3 037/166: DOC: Document sweep_funcall
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/sweeprolog 5fa0e16ee3 037/166: DOC: Document sweep_funcall/2, 3 in the manual |
Date: |
Fri, 30 Sep 2022 04:59:24 -0400 (EDT) |
branch: elpa/sweeprolog
commit 5fa0e16ee39697e341685aecd23e574958fa5757
Author: Eshel Yaron <me@eshelyaron.com>
Commit: Eshel Yaron <me@eshelyaron.com>
DOC: Document sweep_funcall/2,3 in the manual
---
README.org | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/README.org b/README.org
index c5dfa3f0bb..705883aad0 100644
--- a/README.org
+++ b/README.org
@@ -206,6 +206,25 @@ permutations of the list =(1 2 3 4 5)=:
num)
#+end_src
+** Calling Elisp function inside Prolog queries
+:PROPERTIES:
+:CUSTOM_ID: funcall-from-prolog
+:END:
+
+The =sweep-module= defines the foreign Prolog predicates =sweep_funcall/2=
+and =sweep_funcall/3=, which allow for calling Elisp functions from
+Prolog code. These predicates may only be called in the context of a
+Prolog query initiated by =sweep-open-query=, i.e. only in the Prolog
+thread controlled by Emacs. The first argument to these predicates is
+a Prolog string holding the name of the Elisp function to call. The
+last argument to these predicates is unified with the return value of
+the Elisp function, represented as a Prolog term (see [[Conversion of
+Elisp objects to Prolog terms]]). The second argument of
+=sweep_funcall/3= is converted to an Elisp object (see [[Conversion of
+Prolog terms to Elisp objects]]) and passed as a sole argument to the
+invoked Elisp function. The =sweep_funcall/2= variant invokes the Elisp
+function without any arguments.
+
* The Prolog top-level
:PROPERTIES:
- [nongnu] elpa/sweeprolog 972337d6d0 040/166: FIXED: accidentally left debugging remnants, (continued)
- [nongnu] elpa/sweeprolog 972337d6d0 040/166: FIXED: accidentally left debugging remnants, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 0de5109bf8 064/166: ENHANCED: add completion-at-point in sweep-mode, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 5dfb1366e3 012/166: DOC: fix typo, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog d9546b9414 025/166: ENHANCED: make the prompts used in sweep-find-* customizable, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog e62d23140f 019/166: FIXED: Makefile setting SOEXT to dylib on linux hosts, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 7c15ebc4f1 026/166: ENHANCED: annotate predicates with the summaries from the manual, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 59b9dde951 028/166: DOC: Document sweep-pack-install, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog b67e5b5e3d 029/166: DOC: Expand the manual section about Querying Prolog, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 5455c53eaf 031/166: ENHANCED: Add optional "reverse" argument flag to sweep-open-query, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog ff13d97396 034/166: DOC: Add CUSTOM_ID properties to README.org headings where needed, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 5fa0e16ee3 037/166: DOC: Document sweep_funcall/2, 3 in the manual,
ELPA Syncer <=
- [nongnu] elpa/sweeprolog 66ac977deb 045/166: Make use of the new SWI-Prolog embedded GMP handling..., ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 8f1275f113 044/166: Remove the swipl-devel git submodule, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 5dcdec144d 052/166: PORT: use swipl --dump-runtime-variables to locate SWI-Prolog.h, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog b24f66da61 051/166: Add licensing information, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 43e5cdaf91 054/166: ADDED: global keymap sweep-prefix-map, not bound by default, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 239e205add 059/166: ADDED: sweep-mode, a major mode for editing Prolog code, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog d226bbb70c 063/166: ENHANCED: set per buffer module name in sweep-mode, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog d974b0fe0a 071/166: ADDED: prepare xref backend, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 27c441ab49 068/166: PORT: don't rely on defvar-keymap available only since Emacs 29, ELPA Syncer, 2022/09/30
- [nongnu] elpa/sweeprolog 0b054bac88 072/166: ENHANCED: better detection of the identifier at point, ELPA Syncer, 2022/09/30