GNU Emacs 23.2.1
Fedora xfce 14
我開始進入Prolog,我想用我的emacs作爲IDE在Prolog編程。使用prolog與emacs
目前我使用emacs for c/C++。但不知道如何開始使用Prolog。我知道emacs有一個內置的emacs編程庫。然而,我研究並發現它功能較少,即沒有語法高亮,縮進等。
所以我已經下載了emacs prackage Prolog.el。我已使用M-X Load-library
加載此庫。
但是,我不知道該做什麼之後。我如何編譯我的序言文件?在emacs IDE的菜單中,它對Prolog沒有任何作用。
我還需要爲Prolog下載一些解釋器或編譯器嗎?是否有編譯的emacs命令?編譯c代碼時,我通常在emacs中使用make。
我做了百勝搜索序言和所有這些選擇哪一個呢,我需要?:
gprolog.x86_64 : GNU Prolog is a free Prolog compiler
pl.x86_64 : SWI-Prolog - Edinburgh compatible Prolog compiler
pl-static.x86_64 : Static library for SWI Prolog
ppl-gprolog.x86_64 : The GNU Prolog interface of the Parma Polyhedra Library
ppl-gprolog-static.x86_64 : The static archive for the GNU Prolog interface of the Parma Polyhedra Library
ppl-swiprolog.x86_64 : The SWI-Prolog interface of the Parma Polyhedra Library
ppl-swiprolog-static.x86_64 : The static archive for the SWI-Prolog interface of the Parma Polyhedra Library
ppl-yap.x86_64 : The YAP Prolog interface of the Parma Polyhedra Library
yap.i686 : High-performance Prolog Compiler
yap.x86_64 : High-performance Prolog Compiler
的任何建議非常感謝,
得到了這些結果,所以====== ============編輯=====================
我已經安裝了以下pl.x86_64
我有下載prolog.el並將其放在以下目錄中:
~/.emacs.d/site-lisp/prolog/prolog.el
而且我已經配置我的emacs下列要求:
;;; Prolog mode
(setq load-path (cons "~/.emacs.d/site-lisp/prolog/prolog.el" load-path))
(autoload 'run-prolog "prolog" "Start a Prolog sub-process." t)
(autoload 'prolog-mode "prolog" "Major mode for editing prolog programs." t)
(setq prolog-system 'swi) ; prolog-system below for possible values
(setq auto-mode-alist (append '(("\\.pl$" . prolog-mode))
auto-mode-alist))
所以,當我將文件保存爲*特等我得到的序言菜單選項。
所以我寫了一些序言代碼,並在序言菜單中,我選擇Run interactive prolog session
我得到第二個空白緩衝區中打開它說(Inferior Prolog:run Shell-Compile)
但是,我不知道我需要在此做階段。我如何編譯並運行prolog文件?
非常感謝您的支持。
在一個側面說明:我不知道在您的內置序言模式來源於印象。也許你看過一些指的是Emacs的舊版本。在當前版本中,它絕對支持語法高亮和縮進。您可能會發現您下載的備用軟件包實際上可能已過時,並且內置模式比現在更好。 – 2011-03-13 13:53:30