From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Jesper Harder Newsgroups: gmane.emacs.help Subject: Re: write your own emacs mode Date: Tue, 16 Dec 2003 13:37:50 +0100 Organization: http://purl.org/harder/ Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1071578810 6242 80.91.224.253 (16 Dec 2003 12:46:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 16 Dec 2003 12:46:50 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 16 13:46:47 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AWEb9-00030y-00 for ; Tue, 16 Dec 2003 13:46:47 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AWFXf-0002Mg-1x for geh-help-gnu-emacs@m.gmane.org; Tue, 16 Dec 2003 08:47:15 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!syros.belnet.be!news.belnet.be!newsfeed00.sul.t-online.de!t-online.de!news.tele.dk!not-for-mail Original-Newsgroups: gnu.emacs.help X-Face: ^RrvqCr7c,P$zTR:QED"@h9+BTm-"fjZJJ-3=OU7.)i/K]<.J88}s>'Z_$r; List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:15317 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:15317 Joerg Schuster writes: > Jesper Harder writes: > >> You can either turn of syntactic fontification in your mode (this >> will also inhibit font locking of comments) or modify the syntax >> table of the mode. > > Does the meaning of the regexes (like in ;;1) depend on the > syntax-table? I don't think any of your _specific_ regexps depend on the syntax. But in general regexps can depend on the syntax table since we have backlash constructs such as \w which matches characters with word-constituent syntax, or \b which matches the beginning or end of a word. > Why do the regexes ;;a and ;;b match parts of the same "word" (where > word is any string that doesn't contain \s characters)? I'm not quite sure about what you intend to do. But I'll recommend the very handy tool `M-x re-builder' for crafting some suitable regexps. > According to C-h f define-generic-modeI, ;;2 is a FUNCTION-LIST > argument. Why isn't it possible to write '((modify-syntax-entry ?/ > "w")) at this place? (modify-syntax-entry ...) is a function call, not a function. You can use something like: '((lambda () (modify-syntax-entry ?\" "w")))