Erlang Mailing Lists

Author Message

<  Erlang bugs mailing list  ~  erlang.el breaks Emacs unicode handling

Guest
Posted: Sun Apr 01, 2007 10:01 am Reply with quote
Guest
The Erlang Emacs mode under lib/tools/emacs/erlang.el in the OTP
distribution contains a bug that breaks unicode handling in other parts
of Emacs after an Erlang buffer has been visited.

I noticed the problem on XEmacs 21.4.19 where after loading an Erlang
file, visiting a Gnus (v5.10.7) summary buffer containing unicode
subject lines produces an error like this:

(args-out-of-range "<unicode string>" 34)
string-match("\\b[^@ <>]+[!@][^@ <>]+\\b" "<unicode string>")

I subsequently managed to reproduce the problem using the following
sequence:
1) start XEmacs
2) visit an Erlang buffer
3) execute the following Elisp expression: (string-match "\\b" "Ӳ")
--> args-out-of-range-error

When omitting step 2, step 3 succeeds.

I tracked down the problem to a missing buffer-local declaration in
erlang.el. Adding

(make-local-variable 'parse-sexp-lookup-properties)

to erlang-electric-init fixes that. I have attached a patch.

The bug is present in R11B-4 and R11B-3. I haven't looked back further,
but chances are it has been there for a while. It is also present in the
erlang-mode debian package.

I cannot reproduce the bug on Gnu Emacs, though I suspect that there too
some undesirable behaviour can result from erlang.el stomping on
parse-sexp-lookup-properties. The fix certainly doesn't appear to do any
harm.


Regards,

Matthias.


Post recived from mailinglist

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum