]> code.delx.au - gnu-emacs/commitdiff
Merge from emacs--devo--0
authorMiles Bader <miles@gnu.org>
Sat, 17 Jun 2006 20:57:37 +0000 (20:57 +0000)
committerMiles Bader <miles@gnu.org>
Sat, 17 Jun 2006 20:57:37 +0000 (20:57 +0000)
Patches applied:

 * emacs--devo--0  (patch 300-313)

   - Update from CVS
   - Update from CVS: lispref/display.texi (Forcing Redisplay): Fix typo.
   - Merge from gnus--rel--5.10

 * gnus--rel--5.10  (patch 105-106)

   - Update from CVS

Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-74

21 files changed:
1  2 
etc/NEWS
lib-src/makefile.w32-in
lisp/ChangeLog
lisp/cus-start.el
lisp/language/ethio-util.el
lisp/mail/sendmail.el
lisp/term.el
lisp/term/mac-win.el
lisp/textmodes/ispell.el
src/.gdbinit
src/ChangeLog
src/callproc.c
src/dispextern.h
src/dispnew.c
src/lread.c
src/macfns.c
src/macterm.c
src/window.c
src/xdisp.c
src/xterm.c
src/xterm.h

diff --cc etc/NEWS
Simple merge
Simple merge
diff --cc lisp/ChangeLog
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc lisp/term.el
Simple merge
index b5dc01ff9bfce6cba9d3c4e12e0394d7092a485d,7ab9ac9481f83bd9d5a6af082c7baa447b32743c..9843d984e340a8f7da7f07a7cb26329f3b734f30
@@@ -1319,8 -1272,8 +1322,8 @@@ correspoinding TextEncodingBase value.
          (if (string-match "[\xa0\xfd-\xff]" str)
              (setq str nil)
            ;; ASCII-only?
-           (unless (string-match "\\`[[:ascii:]]*\\'" str)
+           (unless (mac-code-convert-string data nil mac-text-encoding-ascii)
 -            (subst-char-in-string ?\x5c ?\\e(J\\e(B str t)
 +            (subst-char-in-string ?\x5c ?\¥ str t)
              (subst-char-in-string ?\x80 ?\\ str t)))))
      (or str
        (decode-coding-string data
Simple merge
diff --cc src/.gdbinit
Simple merge
diff --cc src/ChangeLog
Simple merge
diff --cc src/callproc.c
Simple merge
Simple merge
diff --cc src/dispnew.c
Simple merge
diff --cc src/lread.c
index d8abde1c4588350acbc1200333c49fdff334b721,a0d4ad825ddc0870d007999c2190a3fdb8c76820..6ea92d1aebf76d394202a4945bd9415dc8b98324
@@@ -1915,16 -1717,59 +1915,19 @@@ read0 (readcharfun
  static int read_buffer_size;
  static char *read_buffer;
  
 -/* Read multibyte form and return it as a character.  C is a first
 -   byte of multibyte form, and rest of them are read from
 -   READCHARFUN.  */
 -
 -static int
 -read_multibyte (c, readcharfun)
 -     register int c;
 -     Lisp_Object readcharfun;
 -{
 -  /* We need the actual character code of this multibyte
 -     characters.  */
 -  unsigned char str[MAX_MULTIBYTE_LENGTH];
 -  int len = 0;
 -  int bytes;
 -
 -  if (c < 0)
 -    return c;
 -
 -  str[len++] = c;
 -  while ((c = READCHAR) >= 0xA0
 -       && len < MAX_MULTIBYTE_LENGTH)
 -    {
 -      str[len++] = c;
 -      readchar_count--;
 -    }
 -  UNREAD (c);
 -  if (UNIBYTE_STR_AS_MULTIBYTE_P (str, len, bytes))
 -    return STRING_CHAR (str, len);
 -  /* The byte sequence is not valid as multibyte.  Unread all bytes
 -     but the first one, and return the first byte.  */
 -  while (--len > 0)
 -    UNREAD (str[len]);
 -  return str[0];
 -}
 -
  /* Read a \-escape sequence, assuming we already read the `\'.
 -   If the escape sequence forces unibyte, store 1 into *BYTEREP.
 -   If the escape sequence forces multibyte, store 2 into *BYTEREP.
 -   Otherwise store 0 into *BYTEREP.  */
 +   If the escape sequence forces unibyte, return eight-bit char.  */
  
  static int
 -read_escape (readcharfun, stringp, byterep)
 +read_escape (readcharfun, stringp)
       Lisp_Object readcharfun;
       int stringp;
 -     int *byterep;
  {
    register int c = READCHAR;
+   /* \u allows up to four hex digits, \U up to eight. Default to the
+      behaviour for \u, and change this value in the case that \U is seen. */
+   int unicode_hex_count = 4;
  
 -  *byterep = 0;
 -
    switch (c)
      {
      case -1:
        return i;
        }
  
+     case 'U':
+       /* Post-Unicode-2.0: Up to eight hex chars.  */
+       unicode_hex_count = 8;
+     case 'u':
+       /* A Unicode escape. We only permit them in strings and characters,
+        not arbitrarily in the source code, as in some other languages.  */
+       {
+       int i = 0;
+       int count = 0;
+       Lisp_Object lisp_char;
+       struct gcpro gcpro1;
+       while (++count <= unicode_hex_count)
+         {
+           c = READCHAR;
+           /* isdigit(), isalpha() may be locale-specific, which we don't
+              want. */
+           if      (c >= '0' && c <= '9')  i = (i << 4) + (c - '0');
+           else if (c >= 'a' && c <= 'f')  i = (i << 4) + (c - 'a') + 10;
+             else if (c >= 'A' && c <= 'F')  i = (i << 4) + (c - 'A') + 10;
+           else
+             {
+               error ("Non-hex digit used for Unicode escape");
+               break;
+             }
+         }
+       GCPRO1 (readcharfun);
+       lisp_char = call2(intern("decode-char"), intern("ucs"),
+                         make_number(i));
+       UNGCPRO;
+       if (EQ(Qnil, lisp_char))
+         {
+           /* This is ugly and horrible and trashes the user's data.  */
+           XSETFASTINT (i, MAKE_CHAR (charset_katakana_jisx0201,
+                                      34 + 128, 46 + 128));
+             return i;
+         }
+       else
+         {
+           return XFASTINT (lisp_char);
+         }
+       }
      default:
 -      if (BASE_LEADING_CODE_P (c))
 -      c = read_multibyte (c, readcharfun);
        return c;
      }
  }
diff --cc src/macfns.c
Simple merge
diff --cc src/macterm.c
Simple merge
diff --cc src/window.c
Simple merge
diff --cc src/xdisp.c
Simple merge
diff --cc src/xterm.c
Simple merge
diff --cc src/xterm.h
Simple merge