Did you know ... Search Documentation:
Pack pac -- prolog/misc/prolog-elisp.pl
PublicShow source
 region(?A, -X) is det
Unify Unify X with the content of the buffer region when A == [], otherwise, with A.
 overwrite(+X:codes, ?_) is det
Kill the region, and insert X to the buffer.
 insert_buffer(+X:term) is det
Insert X into the current buffer.
 neighbor_string(+X:string, +B:string, +E:string, +I:integer, -S:string) is det
True if S is the minimum substring of X such that sub_string(X, J, K, _, S), J + length(B) =< I =< K - length(E), and that S has B as a prefix, and E as a suffix.
 wait(P:list_command, P) is det
Send a lisp Command P, and wait a response.
 lisp_to_list(+X:term, -Y:list) is det
Ask emacs to eval an meta-exression X, and unify Y with a list returned from emacs.
 read_term_from_lisp(-X:term) is det
Read a term converted from emacs-lisp text with nullstop.
 call_lisp(+X:term, ?O:options) is det
Ask lisp to eval X as an S expression, with options value(V) ; V is unified with a return value codes string(t) : require lisp to use 'prin1_to_string' string(nil) : tell lisp not to use 'prin1_to_string' wait : require lisp to send 'done' when done. lisp : tell lisp not to reply.
 call_lisp(+X:term) is det
Shorthand for call_lisp(X, [wait]).
 lisp(X) is det
Shorthand for call_lisp(X, [noreply]).
 wait(X) is det
Shorthand for call_lisp_wait(X).
 call_lisp_wait(X) is det
Shorthand for call_lisp(X, [wait]).
 call_lisp_text(X, Y) is det
Shorthand for call_lisp(X, [value(Y)]).
 read_mini_buffer(+P:sring, -S:string) is det
Read a string from the emacs mini-buffer.
 set_string(+X:atom, +Y:text) is det
Ask emacs lisp to eval S-expression "(setq X Y)".
 get_string(X:atom, -V:string) is det
Unify V with the string that is bound to a lisp atom X.
 set_mark_region(X, X) is det
Mark paragraph region.
 meta_handle(+G, +M, +Sp, +P)
  • +G : goal,
  • +M : module prefix
  • +Sp : a predicate with arity 4.
  • +P : a list, [] or [_,_]
Execute G almost in the same way as for phrase(G, X, Y) when P = [X,Y], or call(G) when P=[]. For each atomic pharse P of G

meta_handle(B, M, Sp, [])

is executed when call(Sp, M, P, B) is true.

This predicate is convenient to test

handles, which may have handle calls in the body, and see their outputs on emacs buffer window.

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

 region_term(Arg1, Arg2)
 overwrite(Arg1, Arg2, Arg3)
 paragraph(Arg1, Arg2)
 send_off(Arg1)
 lisp(Arg1, Arg2)
 message(Arg1)
 neighbor_string(Arg1, Arg2, Arg3)
 read_codes(Arg1)
 read_codes(Arg1, Arg2)