Hi Vin
> I get the same results from 21.4 (latest hg sources) as I do from
> 21.5; here's the lossage:
[...]
Just to be sure I get your message correct. I don't see the warning in
your output. Does it mean you don't get the problem with latest 21.4?
But I do get it with latest 21.4! Could it depend on features? Mine
is mule enabled!?
Yours
--
%% Mats
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta
Hi,
Looking at some old bug reports on XEmacs in Gentoo I found this
problem that is still present in 21.4.22.
The recipe is:
$ xemacs -q
> M-x font-lock-mode RET
> Paste this text below to the *scratch* buffer and evaluate it
(font-lock-add-keywords nil
'(("\\<\\(FIXME\\):" 1 font-lock-warning-face prepend)
("\\<\\(and\\|or\\|not\\)\\>" . font-lock-keyword-face)))
This results in the error message:
(1) (warning/warning) Error caught in `font-lock-pre-idle-hook':
(invalid-function 1)
This problem was in Gentoo reported also for 21.5.28. It seems though
that is has been fixed because with 21.5.34 I'm not able to reproduce.
Is this a known problem? Is it known to have been fixed for 21.5?
Would it possible to fix for 21.4 as well?
Yours
--
%% Mats
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta
Ar an triú lá de mí Lúnasa, scríobh Uwe Brauer:
> > But keeping the original translation table and using #'regexp-quote
> > is much less likely to introduce bugs.
>
> BTW could the translation table contain constructions with allow
> arguments, such as the following query-replace-regexp?
>
> (query-replace-regexp "\\([i]\\)on" "\\1'on")
Yes, but if so you can’t use regexp-quote, because regexp-quote will ensure
this won’t work.
--
‘Liston operated so fast that he once accidentally amputated an assistant’s
fingers along with a patient’s leg, […] The patient and the assistant both
died of sepsis, and a spectator reportedly died of shock, resulting in the
only known procedure with a 300% mortality.’ (Atul Gawande, NEJM, 2012)
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta
Hello
Here is the scenario.
I have a very old LaTeX which is full of definitions like:
\def\be{\begin{equation}}
\def\ee{\end{equation}}
\def\bqa{\begin{eqnarray}}
\def\eqa{\end{eqnarray}}
Etc. I want to replace the old definitions by the original LaTeX
commands (for many reasons)
Now I have some old code[1] which allows me to define a list and then all
in once.
The table structure is
(defvar old2new-trans-tab
'(
("\\al" "\\alpha")
("\\a" "\\\[0.2cm]")))
The relevant function which is doing the replacement is.
(defun ltxoldnew-translate-conventions (trans-tab)
"Use the translation table argument to translate the current buffer."
(save-excursion
(let ((beg (point-min-marker)) ; see the `(elisp)Narrowing' Info node
(end (point-max-marker)))
(unwind-protect
(progn
(widen)
(goto-char (point-min))
(let ((buffer-read-only nil) ; (inhibit-read-only t)?
(case-fold-search nil))
(while trans-tab
(save-excursion
(let ((trans-this (car trans-tab)))
(while (search-forward (car trans-this) nil t)
(replace-match (car (cdr trans-this)) t t)))
(setq trans-tab (cdr trans-tab))))))
(narrow-to-region beg end)))))
The problem is that there at least two constructs which have a similar
starting but different ending, \a an \al.
So I thought I replace
(while (search-forward (car trans-this) nil t)
by
(while (search-forward-regexp (car trans-this) nil t)
And the table
(defvar old2new-trans-tab
'(
("\b\al\b" "\\alpha")
("\b\a\b" "\\\[0.2cm]")))
But it does not work. Does anybody know how to add some
regexp-functionality like word boundaries in the code?
thanks
uwe Brauer
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta