Lucrarea nr. 1
Legatura dintre Emacs si SWI-Prolog


La fisierul "~/.emacs" trebuie adaugate urmatoarele linii:

(setq load-path (cons "~levente/prolog/emacs/" load-path))
(autoload 'run-prolog "swi-prolog19" "Run an inferior prolog process" t)
(autoload 'prolog-mode "swi-prolog19" "SWI-Prolog mode" t)
(setq auto-mode-alist
      (cons '("\\.pl$" . prolog-mode) auto-mode-alist))

Comenzi mai importante legate de modul de lucru Prolog-Emacs:
 
Comanda Shortcut Mediu
prolog-compile-buffer-only f9 (prolog)
next-error C-x `
prolog-indent-command TAB (prolog)
prolog-indent-clause M-C-q (prolog)
mark-clause M-h (prolog)
kill-clause M-C-k (prolog)
beginning-of-clause M-C-a (prolog)
end-of-clause M-C-e
interrupt-prolog C-c C-c (Prolog:run)
prolog-previous-command C-c C-p (Prolog:run)
prolog-next-command C-c C-n (Prolog:run)
prolog-dabbrev-atom TAB (Prolog:run)
prolog-complete-atom C-d (Prolog:run)
forward-term M-C-f
backward-term M-C-b
find-definition M-.
find-definition M-,