[slime-devel] Indenting and matching square brackets
heller at common-lisp.net
Sun Jul 3 16:00:30 UTC 2005
Steve Huffman <steve.huffman at gmail.com> writes:
> I'm having trouble matching and indenting square brackets.
> All is well in *scratch* and in emacs-lisp mode, but in Lisp Slime I
> cannot get square brackets to match or auto-indent. It's certainly
> not mission-critical, but it's definitely a nuisance.
> Thanks for any help,
emacs-lisp-mode and lisp-mode use different syntax tables. I have
(modify-syntax-entry ?\[ "(]" lisp-mode-syntax-table)
(modify-syntax-entry ?\] ")[" lisp-mode-syntax-table)
in my .emacs to tell Emacs that square brackets are some kind of
Depending on your Emacs version, you might also add
(modify-syntax-entry ?# "' 14bp" lisp-mode-syntax-table)
(modify-syntax-entry ?| "_ 23b" lisp-mode-syntax-table)
(modify-syntax-entry ?\n ">a" lisp-mode-syntax-table)
to get better handling of #| ... |# comments.
More information about the slime-devel