我如何在SLIME的REPL中为常见的lisp获得语法高亮?

我想学习Common Lisp,并通过emacs包管理器安装了emacs(24.3)和slime。

在粘液REPL语法突出显示不起作用。 另一方面,当我启动Lisp-Mode(同时在粘液REPL中)时,表达式的值不再被打印(当我键入时,说“Hello World”并敲回车,我得到一个新行,而不是表达式的值。

(如果我打开lisp文件语法突出显示作品)


这适用于我(http://compgroups.net/comp.emacs/tweaking-slime/95455):

(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))))))
链接地址: http://www.djcxy.com/p/22807.html

上一篇: How can I get syntax highlighting for common lisp in SLIME's REPL?

下一篇: Spring Data Rest: Detected multiple association links with same relation type