Did you know ... Search Documentation:
Pack pac -- prolog/util/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.
 dired_mark_swipl is det
Mark Prolog files in the pacpl7 directory in dired mode.
 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.
 line_get(-X:obj) is det
Unify X with [point(P), begin(B), end(E), line(R)], where P is the current point, B the beginning point, E the end point R the content of the line.
 prolog_symbol_at_point(-X:string) is det
True if X is unified with a symbol at the current line.
 find_handle_call(H:list, C:codes, ?X, ?Y) is det
Find an handle such that H matches the argument of the head of the handle, and let P be the body phrase of the handle. In case no handle being found, let P be the phrase term whose codes is C. Then, in any case, apply the phrase P to [X, Y].
 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.y
 read_term_from_lisp(-X:term) is det
Read a term converted from emacs-lisp text with nullstop.
 call_lisp(+X:term, Option) is det
Ask lisp to eval X as an S expression, with options term(V) : V is unified with a return term codes string(V) : ask emacs-lisp to use 'prin1_to_string' wait : ask emacs-lisp to send 'done' when done. lisp : ask emacs-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_value(X, Y) is det
Shorthand for call_lisp(X, term(Y)).
 call_lisp_string(X, Y) is det
Shorthand for call_lisp(X, string(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.
 global_set_kbd(A:string) is det
Set a global default short cut for a rolog script A.
 global_unset_kbd(K:string) is det
global-unset key in kbd form.
 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)
 book_bibitem(Arg1, Arg2)
 first_token_codes(Arg1, Arg2)
 send_off(Arg1)
 lisp(Arg1, Arg2)
 noreply(Arg1)
 message(Arg1)
 insert(Arg1)
 neighbor_string(Arg1, Arg2, Arg3)
 read_codes(Arg1)
 read_codes(Arg1, Arg2)
 normal_keys(Arg1, Arg2, Arg3)