Re: Release of 11.55

Ralf Angeli <[email protected]>
Newsgroups gmane.emacs.auc-tex
Message-ID <[email protected]>
* Reiner Steib (2005-02-01) writes:

> [1] Filling beyond paragraph boundaries when using `M-q', losing of
>     comment characters.

Here is a minimal testcase:

\documentclass{article}
\begin{document}
\section{foo"=bar}
foo"=bar
baz
\end{document}

With Emacs 21.3 place point onto the start of the line with "baz".
Type `M-: (TeX-find-opening-brace) RET'.  It will return a point in
the buffer, but it should return nil.

`TeX-find-opening-brace' uses `scan-lists' with the syntax table
returned by `TeX-search-syntax-table'.  The problem here is that ?\"
has string quote syntax in Emacs 21.3 which hides the closing brace of
the \section command.  (You can check this by setting the syntax table
with `M-: (set-syntax-table (TeX-search-syntax-table)) RET' and typing
`C-u C-x =' on a `"' character.)  In contrast to Emacs 21.3, CVS Emacs
shows "default" syntax on such a character and therefore is not
affected by the bug.

I checked in a change which sets the syntax of ?\" to punctuation
syntax.  But frankly I don't know why this is necessary at all (and it
probably isn't sufficient to cover every case).  According to the
descriptions of `make-syntax-table' and `make-char-table', the
statement

(make-syntax-table (make-char-table 'syntax-table))

should set up a syntax table with all entries defaulting to nil and
not inheriting from any parent.  But in Emacs 21.3 it either inherits
something or `with-syntax-table' is not working correctly.

In case we cannot rely on the syntax table being empty the use of an
extra syntax table for searching parenthetical constructs is
questionable.

-- 
Ralf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.