From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: showing matching {}[]() in lisp and slime mode Date: Wed, 15 Mar 2006 01:04:29 -0500 Organization: Bell Sympatico Message-ID: <87mzfs5jpx.fsf-monnier+gnu.emacs.help@gnu.org> References: <878xreajmj.fsf-monnier+gnu.emacs.help@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1142403633 21248 80.91.229.2 (15 Mar 2006 06:20:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 15 Mar 2006 06:20:33 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 15 07:20:31 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FJPMy-0005Yt-EJ for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Mar 2006 07:20:28 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FJPMx-0001hb-T4 for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Mar 2006 01:20:27 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns13feed!worldnet.att.net!207.35.177.252!nf3.bellglobal.com!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:xBvOGJabwOsBqZ7HoC/UD7fKVCw= Original-Lines: 32 Original-NNTP-Posting-Host: 67.71.115.9 Original-X-Complaints-To: abuse@sympatico.ca Original-X-Trace: news20.bellglobal.com 1142402669 67.71.115.9 (Wed, 15 Mar 2006 01:04:29 EST) Original-NNTP-Posting-Date: Wed, 15 Mar 2006 01:04:29 EST Original-Xref: shelby.stanford.edu gnu.emacs.help:138161 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:33779 Archived-At: > 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