[Top][All Lists]

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

Re: [PATCH] Unicode Lisp reader escapes

From: Aidan Kehoe
Subject: Re: [PATCH] Unicode Lisp reader escapes
Date: Thu, 4 May 2006 22:55:28 +0200

 Ar an ceathrú lá de mí Bealtaine, scríobh Eli Zaretskii>: 

 > > > I think we should treat them as much as possible consistently with
 > > > the rest of the treatment of unicode chars.  If we start down the
 > > > path of "OK, we can do it like this for those chars but not these, oh
 > > > and as for those ones over there, we'll do it yet some other way", I
 > > > think we're headed for headaches with no real benefit.
 > > 
 > > I agree.
 > What happens when a Lisp file is byte-compiled--do we want the result
 > to depend on the local settings?

It does currently, to the extent of local settings preventing successful
compilation. Cf. this code (on Unix):

(let ((our-test-file-name "/tmp/testing-byte-compile.el"))
  (let ((coding-system-for-write 'iso-8859-1))
    (set-buffer (get-buffer-create our-test-file-name))
    (insert (concat
             ";; -*- coding: utf-8 -*-\n\n"
             "(require 'cl)\n\n"
             "(defun describe-our-string ()\n"
             "  (let ((our-char ?"
             (format "%c%c%c" ?\345 ?\215 ?\227)
             "  (message (format \"\%c maps to \%s\n\" our-char "
             "(split-char our-char)))))\n"))
    (write-file our-test-file-name nil)
    (kill-buffer (current-buffer)))
  (utf-translate-cjk-mode 1)
  (byte-compile-file our-test-file-name)
  (load-file (concat our-test-file-name "c")) 
  (delete-file (concat our-test-file-name "c")) 
  (utf-translate-cjk-mode 0)
  ;; The following byte compilation fails for me; error
  ;; Compiling file /tmp/testing-byte-compile.el at Thu May  4 22:49:00 2006
  ;; testing-byte-compile.el:4:1:Error: Invalid read syntax: "?"
  (byte-compile-file our-test-file-name)
  (load-file (concat our-test-file-name "c")) 

Aidan Kehoe, http://www.parhasard.net/

reply via email to

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