From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: stuart Newsgroups: gmane.emacs.help Subject: changing string delimiter character to be matching curly brackets Date: Wed, 12 Sep 2007 14:31:10 -0700 Organization: http://groups.google.com Message-ID: <1189632670.410621.97420@y42g2000hsy.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1189663623 26664 80.91.229.12 (13 Sep 2007 06:07:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 13 Sep 2007 06:07:03 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Sep 13 08:07:01 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IVhqo-0002tG-J7 for geh-help-gnu-emacs@m.gmane.org; Thu, 13 Sep 2007 08:06:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IVhqn-0001Vk-Pu for geh-help-gnu-emacs@m.gmane.org; Thu, 13 Sep 2007 02:06:53 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!y42g2000hsy.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 35 Original-NNTP-Posting-Host: 208.76.47.44 Original-X-Trace: posting.google.com 1189632670 4154 127.0.0.1 (12 Sep 2007 21:31:10 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 12 Sep 2007 21:31:10 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: y42g2000hsy.googlegroups.com; posting-host=208.76.47.44; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Original-Xref: shelby.stanford.edu gnu.emacs.help:152033 X-Mailman-Approved-At: Thu, 13 Sep 2007 02:06:13 -0400 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:47544 Archived-At: I am creating a custom mode and I want to make curly brackets an alternative way of delimiting string, so that a string 'foo' bould be either {foo} or "foo". I am able to override the comment and escape chars, as follows: ;; Change the interpretation of particular chars in Emacs' syntax table (defvar fst-mode-syntax-table (let ((fst-mode-syntax-table (make-syntax-table))) (modify-syntax-entry ?# "<" fst-mode-syntax-table) ; start comment (modify-syntax-entry ?\n ">" fst-mode-syntax-table) ; end comment (modify-syntax-entry ?\\ "_" fst-mode-syntax-table) ; don't escape quote (modify-syntax-entry ?% "/" fst-mode-syntax-table) ; functions as escape char fst-mode-syntax-table) "Syntax table for fst-mode") But if I add in these lines, it doesn't do what I hoped it would: (modify-syntax-entry ?{ '"' fst-mode-syntax-table) ; start string (modify-syntax-entry ?} '"' fst-mode-syntax-table) ; end string Either the syntax is wrong or the strategy is. (I'm guessing the latter.) Any suggestions? (Please include the obfuscated email below in your reply since I don't regularly check this list. Thanks. s t u a r t | AT | z a p a t a | DOT | o r g