当前位置:编程学习 > 网站相关 >>

为emacs配置newLISP开发环境

首先获取newlisp-mode项目:
[plain]  
~/work$ git clone https://github.com/may/newlisp-mode.git  
然后下载tj-parenface.el文件:
[plain 
wget http://zaryanwhiteemacs.googlecode.com/svn-history/r163/trunk/newlisp-mode/tj-parenface.el  
 
将newlisp-mode目录和tj-parenface.el文件一起放在/opt/emacs_plugins目录下。
 
然后在~/.emacs文件中添加配置:
[plain]  
;; 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 © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,