help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: parens matching not matching all matching parens


From: Arjan Bos
Subject: Re: parens matching not matching all matching parens
Date: Fri, 17 Sep 2004 19:25:13 +0200
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.3) Gecko/20040910

Miles Bader wrote:


Perhaps you want to remove the parenthes-syntax of "(" and ")" (and
maybe brackets too), so that only braces will ever participate in
matching, e.g.:

   (defvar my-wacky-syntax-table
     (let ((table (make-syntax-table)))
       (modify-syntax-entry ?( "." table)
       (modify-syntax-entry ?) "." table)
       (modify-syntax-entry ?[ "." table)
       (modify-syntax-entry ?] "." table)
       table))

   ;; ... later, in mode init function:
   (set-syntax-table my-wacky-syntax-table)

-Miles

Miles,

Sounds like a plan. Do you have any idea as to how I can integrate that in the generic-mode setup I have currently?

This is what I have:

;; rtf-mode
(define-generic-mode 'rtf-generic-mode
  nil
  nil
  (list "\\\\\\([a-z]+\\(-?[0-9]+\\)? ?\\)")
  (list "\\.[rR][tT][fF]")
  nil)

So I should call some function in the last `nil' I presume. Is it possible to combine the (defvar my-wacky-syntax-table ...) with the (set-syntax-table ... )?


Thanks In Advance,

Arjan

--
If you really want to contact me, then replace the "I see you" text by its three letter accronym, hetnet.

Fabricate Diem PVNC, Motto of the Night Watch -- Terry Pratchett

reply via email to

[Prev in Thread] Current Thread [Next in Thread]