help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: showing matching {}[]() in lisp and slime mode


From: Stefan Monnier
Subject: Re: showing matching {}[]() in lisp and slime mode
Date: Wed, 15 Mar 2006 01:04:29 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> First I tried editing lisp-mode.el.

Bad idea.

> When those didn't work I tried adding a hook to slime mode

> from site-lisp\slime.el:
> (setq load-path (cons (lispbox-file "slime-20060110") load-path))
> (setenv "SBCL_HOME" (lispbox-file "sbcl-0.9.7/lib/sbcl"))
> (setenv "CCL_DEFAULT_DIRECTORY" (lispbox-file "openmcl-1.0"))
> (require 'slime)
> (slime-setup)

> ;; my own code starts here
> (defun my-keybindings-hook ()
>   ((modify-syntax-entry ?\[ "(]  " lisp-mode-syntax-table)
>    (modify-syntax-entry ?\] ")[  " lisp-mode-syntax-table)
>    (modify-syntax-entry ?\{ "(}  " lisp-mode-syntax-table)
>    (modify-syntax-entry ?\} "){  " lisp-mode-syntax-table)))

Why "lisp-mode-syntax-table"?

> (add-hook 'lisp-mode-hook 'my-keybindings-hook)
> (add-hook 'slime-mode-hook 'my-keybindings-hook)

In what way does it not work?  Have you tried it in Lisp-mode and/or in
Slime mode?  My guess is that you only tried it in Slime-mode, where it
probably didn't work because slime mode uses another syntax-table than
lisp-mode-syntax-table (presumably it's called slime-mode-syntax-table).


        Stefan


reply via email to

[Prev in Thread] Current Thread [Next in Thread]