* Ben Wing (2005-02-10) writes:
> Font locking of LaTeX constructs for specifying verbatim
> content is done with syntactic keywords in AUCTeX. There are
> two features in GNU Emacs which AUCTeX relies upon and which
> are not present in XEmacs:
Attached is a sync of font-lock with FSF 21.2 that I did awhile ago. I am
not 100% that this works but I think it did at one point. Maybe this
contains what you want.
Thanks for the patch. Unfortunately XEmacs throws an error upon
loading a LaTeX file with the patch applied:
--8<---------------cut here---------------start------------->8---
Signaling: (wrong-type-argument sequencep ?\()
signal(wrong-type-argument (sequencep ?\())
(condition-case data (progn (set-buffer-major-mode buf) (find-file-noselect-1 buf
filename nowarn rawfile truename number)) (t (kill-buffer buf) (signal ... ...)))
(if buf (progn (or nowarn ... ...) (when ... ...) buf) (setq buf (create-file-buffer
filename)) (condition-case data (progn ... ...) (t ... ...)))
(let* ((buf ...) (truename ...) (number ...)) (when (and buf ... ... ...)
(save-excursion ... ...)) (if buf (progn ... ... buf) (setq buf ...) (condition-case data
... ...)))
(if (and wildcards find-file-wildcards (not ...) (string-match "[[*?]"
filename)) (let (... ...) (if ... ... ...)) (let* (... ... ...) (when ... ...) (if buf ...
... ...)))
(if (file-directory-p filename) (or (and find-file-run-dired ...) (error "%s is a
directory" filename)) (if (and wildcards find-file-wildcards ... ...) (let ... ...)
(let* ... ... ...)))
find-file-noselect("~/scratch/verbatim-test.tex" nil nil t)
[...]
call-interactively(find-file)
(dispatch-event "[internal]")
--8<---------------cut here---------------end--------------->8---
Here is the state of a debug-on-entry session just before the error
happens:
--8<---------------cut here---------------start------------->8---
Entering:
* mapcar(identity ?\()
* byte-code("..." [variable --dolist-temp--80418 chars local slist defaults
make-local-variable font-lock-set-defaults t font-lock-cache-state nil
font-lock-cache-position make-marker font-lock-fontified font-lock-multiline
font-lock-find-font-lock-defaults font-lock-choose-keywords font-lock-value-in-major-mode
font-lock-keywords font-lock-compile-keywords font-lock-eval-keywords
font-lock-add-keywords font-lock-remove-keywords font-lock-keywords-only 2
font-lock-keywords-case-fold-search 3 font-lock-syntax-table copy-syntax-table
syntax-table mapcar identity modify-syntax-entry 4 font-lock-beginning-of-syntax-function
5 boundp explicit-defaults major-mode removed-keywords x keywords syntax value
font-lock-defaults font-lock-maximum-decoration font-lock-keywords-alist
font-lock-removed-keywords-alist] 5)
* font-lock-set-defaults()
[...]
--8<---------------cut here---------------end--------------->8---
The `defaults' variable (corresponding to `font-lock-defaults') in
this part of the code has a value of
((font-latex-keywords font-latex-keywords-1 font-latex-keywords-2) nil nil ((?\( .
".") (?\) . ".") (?$ . "\"")) nil)
That means `slist' is
((?\( . ".") (?\) . ".") (?$ . "\""))
In GNU Emacs at the same point of code execution, the value of `slist'
is
((40 . ".") (41 . ".") (36 . "\""))
Also, the numeric character values are already present in
`font-lock-defaults'.
Regarding the "generic string delimiter" syntax class: While checking
the above with XEmacs 21.5 I saw that stuff like "\verb{foo}" will get
fontified correctly even with a normal string delimiter (syntax class
7). I don't know if this is correct, but at least it is different
from XEmacs 21.4.
--
Ralf