Re: [Brett Presnell] Re: Fedora Core 3: File mode specification error
David Kastrup <[email protected]>
| Newsgroups | gmane.emacs.auc-tex |
|---|---|
| Message-ID | <[email protected]> |
Ralf Angeli <[email protected]> writes: > * David Kastrup (2005-01-20) writes: > >> So the only question that remains is how we are going to deal with >> this ourselves. It would appear that Fedora Core 3 has shipped with >> an Emacspeak causing the problem. We had several reports of this by >> now if I remember correctly. > > Two. > >> Probably there are not many calls of regexp-opt that can be passed >> "nil". A grep turns up quite a few calls, however. As far as I can >> see we have stuff in font-latex.el, tex-font.el (what is that? The >> header says "keep this in synch with Emacs-21.1 which we haven't, and >> the changelog has no entry except this having been checked into >> AUCTeX), tex.el and tex-buf.el. > > tex-font.el is a rip-out of fontification code from tex-mode.el. You > can activate it by customizing `TeX-install-font-lock'. If there > still is demand for that we could update it when Emacs 21.4 will be > out. But I doubt many people are still using it. > > Regarding `regexp-opt': The only place where it certainly will get > passed nil is `font-latex-set-syntactic-keywords' because the > variables `font-latex-verbatim-macros' and > `font-latex-verbatim-macros-local' are nil per default. So I think it > would be enough to check only there, that it is only called with a > non-nil value. I don't see a need for replacing every call to > `regexp-opt' with a to-be-implemented `TeX-regexp-opt' which could > handle the nil case. (There are likely other ways to do this.) And > the problem will go away in the not so far future anyway. > > A proposed patch is attached. Yes, it looks ugly, but still better > than let-binding another set of variables. How about (let ((this (append whatever bla)) (that (append blubb blah))) (setq this (and this (regexp-opt this)) that (and that (regexp-opt that))) Of course, this depends on nil being a valid value for this and that. If not, we need (setq this (if this (regexp-opt this) "") that (if that (regexp-opt that) "")) That needs no additional let-binding. On the other hand, it also does not appear much of an improvement. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum