unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Claus <claus.klingberg@gmail.com>
To: "Emacs Devel" <emacs-devel@gnu.org>
Cc: "Lennart Borgman \(gmail\)" <lennart.borgman@gmail.com>
Subject: Re: [Fwd: Re: more on mumamo/php mode]
Date: Tue, 24 Jul 2007 20:37:35 +0200	[thread overview]
Message-ID: <fb5c9a920707241137r4e3d4e4ajea3f51cffac28373@mail.gmail.com> (raw)
In-Reply-To: <46A3367A.6010000@gmail.com>

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) <lennart.borgman@gmail.com> 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 <claus.klingberg@gmail.com>
> To: Lennart Borgman (gmail) <lennart.borgman@gmail.com>
>
> 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
> Emacs-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-devel
>

  reply	other threads:[~2007-07-24 18:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-22 10:50 [Fwd: Re: more on mumamo/php mode] Lennart Borgman (gmail)
2007-07-24 18:37 ` Claus [this message]
2007-07-24 20:02   ` Stefan Monnier
2007-07-24 22:12     ` Lennart Borgman (gmail)
2007-07-25  1:01       ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fb5c9a920707241137r4e3d4e4ajea3f51cffac28373@mail.gmail.com \
    --to=claus.klingberg@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=lennart.borgman@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).