[slime-devel] Problems getting {}[] recognized as parenthesis

Hi! I have been trying to make emacs show matching round and square brackets so that I could use meta parser from http://home.pipeline.com/~hbaker1/Prag-Parse.html. I have been using lispbox from http://gigamonkeys.com/book/lispbox which have slime (from cvs 10.1.2006) bundled. I also tried latest cvs version of slime to see if it would work better. I'm using mic-paren module for showing matching parenthesis. I have edited lisp-mode.el from emacs so that it should show matching parenthesis: (defvar emacs-lisp-mode-syntax-table (let ((table (make-syntax-table))) . . . (modify-syntax-entry ?\( "() " table) (modify-syntax-entry ?\) ")( " table) (modify-syntax-entry ?\[ "(] " table) (modify-syntax-entry ?\] ")[ " table) (modify-syntax-entry ?\{ "(} " table) (modify-syntax-entry ?\} "){ " table)) table)) (defvar lisp-mode-syntax-table (let ((table (copy-syntax-table emacs-lisp-mode-syntax-table))) (modify-syntax-entry ?\[ "(] " table) (modify-syntax-entry ?\] ")[ " table) (modify-syntax-entry ?\{ "(} " table) (modify-syntax-entry ?\} "){ " table) (modify-syntax-entry ?# "' 14bn" table) (modify-syntax-entry ?| "\" 23b" table) table)) When I checked syntax table mappings in slime mode I got this: [ _ which means: symbol ] .. _ _ which means: symbol { _ which means: symbol } .. DEL _ which means: symbol and then The parent syntax table is: [ (] which means: open, matches ] ] )[ which means: close, matches [ { (} which means: open, matches } } ){ which means: close, matches { So is there anything that I could do to make things work? Yours sincerely, Jyrki Jaakkola

On Sat, 18 Mar 2006 21:41:07 +0300, <jjkola@email.com> wrote:
make emacs show matching round and square brackets
One night on IRC, antifuchs worked out this for me: (add to your emacs defaults) ; fix [] in slime (add-hook 'lisp-mode-hook (lambda () (slime-mode t) (modify-syntax-entry ?\[ "(] " lisp-mode-syntax-table) (modify-syntax-entry ?\] ")[ " lisp-mode-syntax-table))) -- Fairy tales do not tell children the dragons exist. Children already know that dragons exist. Fairy tales tell children the dragons can be killed. -- G.K.Chesterton
participants (2)
-
GP lisper
-
jjkola@email.com