[Top][All Lists]

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

Re: [Bug-AUCTeX] 11.84; Font replacing doesn't work for unbalanced paren

From: Ikumi Keita
Subject: Re: [Bug-AUCTeX] 11.84; Font replacing doesn't work for unbalanced parentheses.
Date: Tue, 06 Mar 2007 23:06:47 +0900

>>>>> David Kastrup writes:
>> Could we iterate (in a reasonable amount of time) through all entries
>> in the syntax table and set them to nil?  If not, we likely will have
>> to live with the workaround and hope for Emacs 22 to be released in
>> this millenium.

> Couldn't we just start with

> (setq TeX-search-syntax-table (make-char-table 'syntax-table nil))

> ?

This doesn't work as expected, at least for Emacs 21.  The form

(let ((foo (make-char-table 'syntax-table nil)))
  (char-to-string (with-syntax-table foo (char-syntax ?\())))

returns "(", which indicates that the standard syntax table is used for
an entry which has nil for its value in the current syntax table.

Instead, something like

(setq TeX-search-syntax-table (make-char-table 'syntax-table
      (string-to-syntax " ")))


(setq TeX-search-syntax-table (make-char-table 'syntax-table nil))
(set-char-table-parent TeX-search-syntax-table (make-char-table
  'syntax-table nil))

seems to serve the purpose.  See the following examples.

(let ((foo (make-char-table 'syntax-table (string-to-syntax " "))))
  (char-to-string (with-syntax-table foo (char-syntax ?\())))
  => " "

(let ((foo (make-char-table 'syntax-table nil)))
  (set-char-table-parent foo (make-char-table 'syntax-table nil))
  (char-to-string (with-syntax-table foo (char-syntax ?\())))
  => " "

Ikumi Keita

reply via email to

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