emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fwd: Re: more on mumamo/php mode]


From: Claus
Subject: Re: [Fwd: Re: more on mumamo/php mode]
Date: Tue, 24 Jul 2007 20:37:35 +0200

Hello,

all I could find about this issue was the explanation in the thread
linked from my message. The description of the cause goes like this:

"I found why this error happens. In the recent CVS Emacs, as
utf-translate-cjk-mode is on by default, some Unicode characters will
be decoded into one of CJK character set. But, as
xsdre-range-list-to-char-alternative (xsd-regexp.el) simply do
something like this to generate a character range: (format "%c-%c"
(decode-char 'ucs FROM) (decode-char 'ucs TO)) the resulting regexp
causes the above error."

The patch below is supposingly fixing this issue (and is working for
me). However, I guess we need someone to verify this since the
original maintainer is currently not available. Could someone look
into this and suggest whether this is the right solution?

--- xsd-regexp.el.orig  2006-01-27 00:31:24.000000000 +0100
+++ xsd-regexp.el       2006-01-27 00:32:20.328529600 +0100
@@ -290,7 +290,8 @@
(defun xsdre-compile-single-char (ch)
  (if (memq ch '(?. ?* ?+ ?? ?\[ ?\] ?^ ?$ ?\\))
      (string ?\\ ch)
-    (string (decode-char 'ucs ch))))
+    (let ((utf-translate-cjk-mode nil))
+      (string (decode-char 'ucs ch)))))

(defun xsdre-char-class-to-range-list (cc)
  "Return a range-list for a symbolic char-class."
@@ -403,7 +404,8 @@
      (setq range-list (cdr range-list)))
    (setq chars
          (mapcar (lambda (c)
-                   (decode-char 'ucs c))
+                    (let ((utf-translate-cjk-mode nil))
+                      (decode-char 'ucs c)))
                  chars))
    (when caret
      (setq chars (cons ?^ chars)))

Thanks,
Claus



On 7/22/07, Lennart Borgman (gmail) <address@hidden> wrote:
I got this report some days ago. Could please someone who understands
what utf-translate-cjk-mode does comment on this?


-------- Original Message --------
Subject: Re: more on mumamo/php mode
Date: Thu, 19 Jul 2007 16:47:21 +0200
From: Claus <address@hidden>
To: Lennart Borgman (gmail) <address@hidden>

Hi Lennart,

some status update and a question on nxhtml-mode:

1. Somebody reported an error in nxml-mode upon validation/parsing
("Invalid regexp: Range striding over charsets") with Emacs 22 on the
nxml-mailing list (see e.g.
http://osdir.com/ml/emacs.nxml.general/2006-01/msg00039.html). Shortly
after Darkman posted a patch that seemed to work (at least for me):

http://drkm-lib.sourceforge.net/nxml/xsd-regexp.el.2006-01-26.patch



_______________________________________________
Emacs-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-devel





reply via email to

[Prev in Thread] Current Thread [Next in Thread]