我想学习Common Lisp并通过emacs包管理器安装了emacs(24.3)和slime。
在粘液中,REPL语法突出显示不起作用。另一方面,当我启动Lisp-Mode(同时在粘液REPL中)时,表达式的值不再被打印(当我打字时,说" Hello World"然后点击输入I获取一个新行而不是表达式的值。
(如果我打开lisp文件语法高亮显示工作)
答案 0 :(得分:3)
(defvar slime-repl-font-lock-keywords lisp-font-lock-keywords-2)
(defun slime-repl-font-lock-setup ()
(setq font-lock-defaults
'(slime-repl-font-lock-keywords
;; From lisp-mode.el
nil nil (("+-*/.<>=!?$%_&~^:@" . "w")) nil
(font-lock-syntactic-face-function
. lisp-font-lock-syntactic-face-function))))
(add-hook 'slime-repl-mode-hook 'slime-repl-font-lock-setup)
(defadvice slime-repl-insert-prompt (after font-lock-face activate)
(let ((inhibit-read-only t))
(add-text-properties
slime-repl-prompt-start-mark (point)
'(font-lock-face
slime-repl-prompt-face
rear-nonsticky
(slime-repl-prompt read-only font-lock-face intangible))))))