歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> 為Emacs配置newLISP開發環境

為Emacs配置newLISP開發環境

日期:2017/2/28 14:53:12   编辑:Linux教程

首先獲取newlisp-mode項目:

~/work$ git clone https://github.com/may/newlisp-mode.git

然後在~/.emacs文件中添加配置:

;; newLISP mode
(add-to-list 'load-path (expand-file-name "/opt/emacs_plugins/newlisp/newlisp-mode/"))
(load-file "/opt/emacs_plugins/newlisp/newlisp-mode/newlisp.el")
(add-to-list 'auto-mode-alist '("\\.lsp$" . newlisp-mode))

;;;; Things that might make life easier:

;; Make Emacs' "speedbar" recognize newlisp files
(eval-after-load "speedbar" '(speedbar-add-supported-extension ".lsp"))

;; Another way to use C-x C-e to eval stuff and doesn't jump to next function
(define-key newlisp-mode-map [(control x) (control e)] 'newlisp-evaluate-prev-sexp)

;; I think I got tired of typing 'newlisp-show-interpreter' all the time.
(defun start-newlisp ()
"Starts newlisp interpreter/or shows if already running. Requires
newlisp-mode to be loaded."
(interactive)
(newlisp-show-interpreter))

(add-to-list ... 一定要加,否則會一直報錯找不到tj-parenface

現在用emacs打開一個lsp文件,截圖看一下,語法高亮很漂亮的顯示出來了。

Copyright © Linux教程網 All Rights Reserved