commit: Remove interactive specs from #'mswindows-{short, long}-file-name,
16 years, 5 months
Aidan Kehoe
changeset: 4487:866b84b7c97e05aa9d2fabe6ace194f19611018a
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sat Jul 26 11:50:26 2008 +0200
files: src/ChangeLog src/nt.c
description:
Remove interactive specs from #'mswindows-{short,long}-file-name,
2008-07-20 John Paul Wallington <jpw(a)pobox.com>
* nt.c (Fmswindows_short_file_name, Fmswindows_long_file_name):
Remove their interactive specs; they shouldn't be called interactively.
diff -r f9104f0e9b91b9f7ddc23c53ec8a98c625ad992b -r 866b84b7c97e05aa9d2fabe6ace194f19611018a src/ChangeLog
--- a/src/ChangeLog Sat Jul 26 11:46:13 2008 +0200
+++ b/src/ChangeLog Sat Jul 26 11:50:26 2008 +0200
@@ -1,3 +1,8 @@ 2008-07-17 Aidan Kehoe <kehoea@parhasa
+2008-07-20 John Paul Wallington <jpw(a)pobox.com>
+
+ * nt.c (Fmswindows_short_file_name, Fmswindows_long_file_name):
+ Remove their interactive specs; they shouldn't be called interactively.
+
2008-07-17 Aidan Kehoe <kehoea(a)parhasard.net>
* redisplay.c (init_redisplay):
diff -r f9104f0e9b91b9f7ddc23c53ec8a98c625ad992b -r 866b84b7c97e05aa9d2fabe6ace194f19611018a src/nt.c
--- a/src/nt.c Sat Jul 26 11:46:13 2008 +0200
+++ b/src/nt.c Sat Jul 26 11:50:26 2008 +0200
@@ -2063,7 +2063,7 @@ close_file_data (file_data *p_file)
/* Some miscellaneous functions that are Windows specific, but not GUI
specific (ie. are applicable in terminal or batch mode as well). */
-DEFUN ("mswindows-short-file-name", Fmswindows_short_file_name, 1, 1, "", /*
+DEFUN ("mswindows-short-file-name", Fmswindows_short_file_name, 1, 1, 0, /*
Return the short file name version (8.3) of the full path of FILENAME.
If FILENAME does not exist, return nil.
All path elements in FILENAME are converted to their short names.
@@ -2092,7 +2092,7 @@ All path elements in FILENAME are conver
}
-DEFUN ("mswindows-long-file-name", Fmswindows_long_file_name, 1, 1, "", /*
+DEFUN ("mswindows-long-file-name", Fmswindows_long_file_name, 1, 1, 0, /*
Return the long file name version of the full path of FILENAME.
If FILENAME does not exist, return nil.
All path elements in FILENAME are converted to their long names.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Document the error on over-long hex character constants.
16 years, 5 months
Aidan Kehoe
changeset: 4486:f9104f0e9b91b9f7ddc23c53ec8a98c625ad992b
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sat Jul 26 11:46:13 2008 +0200
files: man/ChangeLog man/lispref/objects.texi
description:
Document the error on over-long hex character constants.
2008-07-26 Aidan Kehoe <kehoea(a)parhasard.net>
* lispref/objects.texi (Character Type):
Document the error provoked when the reader sees an over-long
hexadecimal constant.
diff -r 57db42ba54fb4387126a494cd4c4e9d59ab85513 -r f9104f0e9b91b9f7ddc23c53ec8a98c625ad992b man/ChangeLog
--- a/man/ChangeLog Sat Jul 26 11:33:24 2008 +0200
+++ b/man/ChangeLog Sat Jul 26 11:46:13 2008 +0200
@@ -1,3 +1,9 @@ 2008-07-26 Aidan Kehoe <kehoea@parhasa
+2008-07-26 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * lispref/objects.texi (Character Type):
+ Document the error provoked when the reader sees an over-long
+ hexadecimal constant.
+
2008-07-26 Aidan Kehoe <kehoea(a)parhasard.net>
* lispref/variables.texi (Extent):
diff -r 57db42ba54fb4387126a494cd4c4e9d59ab85513 -r f9104f0e9b91b9f7ddc23c53ec8a98c625ad992b man/lispref/objects.texi
--- a/man/lispref/objects.texi Sat Jul 26 11:33:24 2008 +0200
+++ b/man/lispref/objects.texi Sat Jul 26 11:46:13 2008 +0200
@@ -647,17 +647,16 @@ followed by a backslash and the characte
followed by a backslash and the character code in octal (up to three
octal digits); thus, @samp{?\101} for the character @kbd{A},
@samp{?\001} for the character @kbd{C-a}, and @code{?\002} for the
-character @kbd{C-b}.
+character @kbd{C-b}. The reader will finalize the character and start
+reading the next token when a non-octal-digit is encountered or three
+octal digits are read.
The second consists of a question mark followed by a backslash, the
character @samp{x}, and the character code in hexadecimal (up to two
hexadecimal digits); thus, @samp{?\x41} for the character @kbd{A},
@samp{?\x1} for the character @kbd{C-a}, and @code{?\x2} for the
-character @kbd{C-b}.
-
-In both cases, the reader will finalize the character when a non-digit
-is encountered or the maximum length of a character code is reached. It
-then starts reading the next token.
+character @kbd{C-b}. If more than two hexadecimal codes are given, the
+reader signals an error.
@example
@group
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Correct a misspelling and add a space, lispref/variables.texi
16 years, 5 months
Aidan Kehoe
changeset: 4485:57db42ba54fb4387126a494cd4c4e9d59ab85513
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sat Jul 26 11:33:24 2008 +0200
files: man/ChangeLog man/lispref/variables.texi
description:
Correct a misspelling and add a space, lispref/variables.texi
2008-07-26 Aidan Kehoe <kehoea(a)parhasard.net>
* lispref/variables.texi (Extent):
Correct a misspelling of macros, add a needed space. Thank you
John Paul Wallington, thank you Stephen Turnbull.
diff -r d6e2e2e819d7979ff9f812490694f928eef7e2a9 -r 57db42ba54fb4387126a494cd4c4e9d59ab85513 man/ChangeLog
--- a/man/ChangeLog Sat Jul 26 09:52:06 2008 +0200
+++ b/man/ChangeLog Sat Jul 26 11:33:24 2008 +0200
@@ -1,3 +1,9 @@ 2008-05-29 Aidan Kehoe <kehoea@parhasa
+2008-07-26 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * lispref/variables.texi (Extent):
+ Correct a misspelling of macros, add a needed space. Thank you
+ John Paul Wallington, thank you Stephen Turnbull.
+
2008-05-29 Aidan Kehoe <kehoea(a)parhasard.net>
* lispref/objects.texi (Equality Predicates):
diff -r d6e2e2e819d7979ff9f812490694f928eef7e2a9 -r 57db42ba54fb4387126a494cd4c4e9d59ab85513 man/lispref/variables.texi
--- a/man/lispref/variables.texi Sat Jul 26 09:52:06 2008 +0200
+++ b/man/lispref/variables.texi Sat Jul 26 11:33:24 2008 +0200
@@ -895,7 +895,7 @@ variable @code{n} is no longer bound to
@cindex closures not available
Some Lisp dialects have ``closures'', objects that are like functions
but record additional variable bindings. Closures are available in
-XEmacs Lisp using the @code{lexical-let} and @code{lexical-let*}macroes,
+XEmacs Lisp using the @code{lexical-let} and @code{lexical-let*} macros,
which are autoloaded from @file{cl-macs}. @xref{(cl)Lexical Bindings}.
Note that function arguments cannot be closed around using these
macros, and that any lambda expressions returned will not be
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[PATCH] Error on read of over-long hex character constants.
16 years, 5 months
Aidan Kehoe
GNU interpret "\xabcd" as containing one character, we interpret it as
containing three. GNU interpret '(?\xffff) as a list containing a single
integer (specified with character syntax), we interpret it as a list
containing a character and a symbol with the string "ff" as its name. Our
behaviour is more sane, since integer to character mappings above #xFF are
not stable or particularly well-defined, neither in GNU Emacs nor
XEmacs. Code written for the old behaviour is probably wrong, and is easily
rewritten.
In really old code, people would use ?\xffff instead of #xffff because GNU
didn’t support hexadecimal integer read syntax. This isn’t an issue any
more, the versions of GNU Emacs that don’t support #xFFFF are long
obsolete.
I’m about to post a patch detailing the packages changes necessary to
support this change in the trunk.
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1216240563 -7200
# Node ID 7869173584fcd40b83462f6acad1a9e7d8be3da1
# Parent ec442dc06fe1bc671fbe0ed0a928b294cdd45aba
Error on over-long hex character escapes.
2008-07-16 Aidan Kehoe <kehoea(a)parhasard.net>
* lread.c (read_escape):
Error if we're handed an over-long hex character escape, something
which arises reasonably frequently in code written for GNU.
diff -r ec442dc06fe1 -r 7869173584fc src/ChangeLog
--- a/src/ChangeLog Thu Jul 10 23:37:52 2008 +0200
+++ b/src/ChangeLog Wed Jul 16 22:36:03 2008 +0200
@@ -1,3 +1,9 @@
+2008-07-16 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * lread.c (read_escape):
+ Error if we're handed an over-long hex character escape, something
+ which arises reasonably frequently in code written for GNU.
+
2008-07-07 Aidan Kehoe <kehoea(a)parhasard.net>
Patch to make it up to the device-specific code whether
diff -r ec442dc06fe1 -r 7869173584fc src/lread.c
--- a/src/lread.c Thu Jul 10 23:37:52 2008 +0200
+++ b/src/lread.c Wed Jul 16 22:36:03 2008 +0200
@@ -1855,6 +1855,28 @@
break;
}
}
+
+ if (count == 3)
+ {
+ c = readchar (readcharfun);
+ if ((c >= '0' && c <= '9') ||
+ (c >= 'a' && c <= 'f') ||
+ (c >= 'A' && c <= 'F'))
+ {
+ Lisp_Object args[2];
+
+ 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;
+
+ args[0] = build_string ("?\\x%x");
+ args[1] = make_int (i);
+ syntax_error ("Overlong hex character escape",
+ Fformat (2, args));
+ }
+ unreadchar (readcharfun, c);
+ }
+
return i;
}
case 'U':
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghé, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Error on over-long hex character escapes.
16 years, 5 months
Aidan Kehoe
changeset: 4483:7869173584fcd40b83462f6acad1a9e7d8be3da1
parent: 4478:ec442dc06fe1bc671fbe0ed0a928b294cdd45aba
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Wed Jul 16 22:36:03 2008 +0200
files: src/ChangeLog src/lread.c
description:
Error on over-long hex character escapes.
2008-07-16 Aidan Kehoe <kehoea(a)parhasard.net>
* lread.c (read_escape):
Error if we're handed an over-long hex character escape, something
which arises reasonably frequently in code written for GNU.
diff -r ec442dc06fe1bc671fbe0ed0a928b294cdd45aba -r 7869173584fcd40b83462f6acad1a9e7d8be3da1 src/ChangeLog
--- a/src/ChangeLog Thu Jul 10 23:37:52 2008 +0200
+++ b/src/ChangeLog Wed Jul 16 22:36:03 2008 +0200
@@ -1,3 +1,9 @@ 2008-07-07 Aidan Kehoe <kehoea@parhasa
+2008-07-16 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * lread.c (read_escape):
+ Error if we're handed an over-long hex character escape, something
+ which arises reasonably frequently in code written for GNU.
+
2008-07-07 Aidan Kehoe <kehoea(a)parhasard.net>
Patch to make it up to the device-specific code whether
diff -r ec442dc06fe1bc671fbe0ed0a928b294cdd45aba -r 7869173584fcd40b83462f6acad1a9e7d8be3da1 src/lread.c
--- a/src/lread.c Thu Jul 10 23:37:52 2008 +0200
+++ b/src/lread.c Wed Jul 16 22:36:03 2008 +0200
@@ -1855,6 +1855,28 @@ read_escape (Lisp_Object readcharfun)
break;
}
}
+
+ if (count == 3)
+ {
+ c = readchar (readcharfun);
+ if ((c >= '0' && c <= '9') ||
+ (c >= 'a' && c <= 'f') ||
+ (c >= 'A' && c <= 'F'))
+ {
+ Lisp_Object args[2];
+
+ 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;
+
+ args[0] = build_string ("?\\x%x");
+ args[1] = make_int (i);
+ syntax_error ("Overlong hex character escape",
+ Fformat (2, args));
+ }
+ unreadchar (readcharfun, c);
+ }
+
return i;
}
case 'U':
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[PATCH] Correct over-long hex character usage, packages
16 years, 5 months
Aidan Kehoe
mule-packages/mule-ucs/lisp/ChangeLog addition:
2008-07-16 Aidan Kehoe <kehoea(a)parhasard.net>
* utf.el (utf-16-ccl-decode):
* utf.el (ccl-utf-7-decode):
Don't try to use character syntax for integers above #xFF, use
integer hex syntax instead.
xemacs-packages/ecrypto/ChangeLog addition:
2008-07-16 Aidan Kehoe <kehoea(a)parhasard.net>
* ascii-armor.el:
* ascii-armor.el (ascii-armor-to-vec16):
* md5-old.el (md5-i2):
* md5-old.el (md5<<<):
* md5-old.el (md5+):
* md5-old.el (md5-t):
* md5-old.el (md5-vector):
* rc16.el (rc16-set-key):
* rc16.el (rc16-mixin):
* rc16.el (rc16-short):
* sha1-old.el (sha1):
* sha1-old.el (sha1<<<):
* sha1-old.el (sha1+):
* sha1-old.el (sha1-vector):
Don't try to use character syntax for integers above #xFF, use
integer hex syntax instead.
XEmacs Packages source patch:
Diff command: cvs -q diff -Nu
Files affected: xemacs-packages/ecrypto/sha1-old.el
===================================================================
RCS xemacs-packages/ecrypto/rc16.el
===================================================================
RCS xemacs-packages/ecrypto/md5-old.el
===================================================================
RCS xemacs-packages/ecrypto/ascii-armor.el
===================================================================
RCS mule-packages/mule-ucs/lisp/utf.el
===================================================================
RCS
Index: mule-packages/mule-ucs/lisp/utf.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/mule-packages/mule-ucs/lisp/utf.el,v
retrieving revision 1.2
diff -u -u -r1.2 utf.el
--- mule-packages/mule-ucs/lisp/utf.el 2002/03/18 09:29:02 1.2
+++ mule-packages/mule-ucs/lisp/utf.el 2008/07/16 20:51:54
@@ -158,7 +158,7 @@
((if ,(mucs-ccl-check-internal-state 'utf-16-little-endian-p)
((read r6 r4))
((read r4 r6)))
- (r0 = (((r0 & ?\x3ff) + ?\x40) << 10))
+ (r0 = (((r0 & #x3ff) + ?\x40) << 10))
(r6 &= ?\x3f)
(r4 = ((r4 & ?\x3) << 6) | r6)
(r0 |= r4)))))
@@ -452,13 +452,13 @@
(if (r1 >= 0)
((r6 = ((r6 << 6) | r1))
(if (r6 >= ,(cn "0x30000"))
- ((r0 = (r6 & ?\xFFFF))
+ ((r0 = (r6 & #xFFFF))
(r6 = 0))
((read r0)
(r1 = r0 ,ccl-b64-decode-table)
(if (r1 >= 0)
((r6 = ((r6 << 6) | r1))
- (if (r6 >= ?\x800000)
+ (if (r6 >= #x800000)
;; r6 = 1000 XXXX XXXX XXXX XXXX XXXX
((r0 = ((r6 >> 4) & ,(cn "0xFFFF")))
(r6 = ((r6 & ?\xF) | ?\x30)))
Index: xemacs-packages/ecrypto/ascii-armor.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/ecrypto/ascii-armor.el,v
retrieving revision 1.1
diff -u -u -r1.1 ascii-armor.el
--- xemacs-packages/ecrypto/ascii-armor.el 2002/06/13 18:22:04 1.1
+++ xemacs-packages/ecrypto/ascii-armor.el 2008/07/16 20:51:54
@@ -131,7 +131,7 @@
(aset out-vec out-idx (ash buf (- 16 bits-in-buf)))
(decf bits-in-buf 16)
;; turn off the used bits
- (setq buf (logand buf (lognot (ash ?\xffff bits-in-buf)))))
+ (setq buf (logand buf (lognot (ash #xffff bits-in-buf)))))
out-vec))
Index: xemacs-packages/ecrypto/md5-old.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/ecrypto/md5-old.el,v
retrieving revision 1.1
diff -u -u -r1.1 md5-old.el
--- xemacs-packages/ecrypto/md5-old.el 2002/06/13 18:22:07 1.1
+++ xemacs-packages/ecrypto/md5-old.el 2008/07/16 20:51:54
@@ -100,7 +100,7 @@
(logior x
;; this is normally a lognot, but that would set
;; high bits, and there's no logand to clear them.
- (logxor z ?\xffff))))
+ (logxor z #xffff))))
(defsubst md5-f (x y z)
(cons (md5-f2 (car x) (car y) (car z))
@@ -129,86 +129,86 @@
(rotatef a b)
(decf shift 16))
- (cons (logand ?\xffff (logior (ash a shift) (ash b (- shift 16))))
- (logand ?\xffff (logior (ash b shift) (ash a (- shift 16)))))))
+ (cons (logand #xffff (logior (ash a shift) (ash b (- shift 16))))
+ (logand #xffff (logior (ash b shift) (ash a (- shift 16)))))))
(defsubst md5+ (&rest args)
;; enough room to just add without carry checks
(let* ((lo (apply #'+ (mapcar #'cdr args)))
(hi (+ (ash lo -16) (apply #'+ (mapcar #'car args)))))
- (cons (logand ?\xffff hi)
- (logand ?\xffff lo))))
+ (cons (logand #xffff hi)
+ (logand #xffff lo))))
;; array of values for i=[1..64] => floor(2^32 * abs(sin(i)))
(defconst md5-t
- [(?\xd76a . ?\xa478)
- (?\xe8c7 . ?\xb756)
- (?\x2420 . ?\x70db)
- (?\xc1bd . ?\xceee)
- (?\xf57c . ?\x0faf)
- (?\x4787 . ?\xc62a)
- (?\xa830 . ?\x4613)
- (?\xfd46 . ?\x9501)
- (?\x6980 . ?\x98d8)
- (?\x8b44 . ?\xf7af)
- (?\xffff . ?\x5bb1)
- (?\x895c . ?\xd7be)
- (?\x6b90 . ?\x1122)
- (?\xfd98 . ?\x7193)
- (?\xa679 . ?\x438e)
- (?\x49b4 . ?\x0821)
-
- (?\xf61e . ?\x2562)
- (?\xc040 . ?\xb340)
- (?\x265e . ?\x5a51)
- (?\xe9b6 . ?\xc7aa)
- (?\xd62f . ?\x105d)
- (?\x0244 . ?\x1453)
- (?\xd8a1 . ?\xe681)
- (?\xe7d3 . ?\xfbc8)
- (?\x21e1 . ?\xcde6)
- (?\xc337 . ?\x07d6)
- (?\xf4d5 . ?\x0d87)
- (?\x455a . ?\x14ed)
- (?\xa9e3 . ?\xe905)
- (?\xfcef . ?\xa3f8)
- (?\x676f . ?\x02d9)
- (?\x8d2a . ?\x4c8a)
-
- (?\xfffa . ?\x3942)
- (?\x8771 . ?\xf681)
- (?\x6d9d . ?\x6122)
- (?\xfde5 . ?\x380c)
- (?\xa4be . ?\xea44)
- (?\x4bde . ?\xcfa9)
- (?\xf6bb . ?\x4b60)
- (?\xbebf . ?\xbc70)
- (?\x289b . ?\x7ec6)
- (?\xeaa1 . ?\x27fa)
- (?\xd4ef . ?\x3085)
- (?\x0488 . ?\x1d05)
- (?\xd9d4 . ?\xd039)
- (?\xe6db . ?\x99e5)
- (?\x1fa2 . ?\x7cf8)
- (?\xc4ac . ?\x5665)
-
- (?\xf429 . ?\x2244)
- (?\x432a . ?\xff97)
- (?\xab94 . ?\x23a7)
- (?\xfc93 . ?\xa039)
- (?\x655b . ?\x59c3)
- (?\x8f0c . ?\xcc92)
- (?\xffef . ?\xf47d)
- (?\x8584 . ?\x5dd1)
- (?\x6fa8 . ?\x7e4f)
- (?\xfe2c . ?\xe6e0)
- (?\xa301 . ?\x4314)
- (?\x4e08 . ?\x11a1)
- (?\xf753 . ?\x7e82)
- (?\xbd3a . ?\xf235)
- (?\x2ad7 . ?\xd2bb)
- (?\xeb86 . ?\xd391)])
+ [(#xd76a . #xa478)
+ (#xe8c7 . #xb756)
+ (#x2420 . #x70db)
+ (#xc1bd . #xceee)
+ (#xf57c . #x0faf)
+ (#x4787 . #xc62a)
+ (#xa830 . #x4613)
+ (#xfd46 . #x9501)
+ (#x6980 . #x98d8)
+ (#x8b44 . #xf7af)
+ (#xffff . #x5bb1)
+ (#x895c . #xd7be)
+ (#x6b90 . #x1122)
+ (#xfd98 . #x7193)
+ (#xa679 . #x438e)
+ (#x49b4 . #x0821)
+
+ (#xf61e . #x2562)
+ (#xc040 . #xb340)
+ (#x265e . #x5a51)
+ (#xe9b6 . #xc7aa)
+ (#xd62f . #x105d)
+ (#x0244 . #x1453)
+ (#xd8a1 . #xe681)
+ (#xe7d3 . #xfbc8)
+ (#x21e1 . #xcde6)
+ (#xc337 . #x07d6)
+ (#xf4d5 . #x0d87)
+ (#x455a . #x14ed)
+ (#xa9e3 . #xe905)
+ (#xfcef . #xa3f8)
+ (#x676f . #x02d9)
+ (#x8d2a . #x4c8a)
+
+ (#xfffa . #x3942)
+ (#x8771 . #xf681)
+ (#x6d9d . #x6122)
+ (#xfde5 . #x380c)
+ (#xa4be . #xea44)
+ (#x4bde . #xcfa9)
+ (#xf6bb . #x4b60)
+ (#xbebf . #xbc70)
+ (#x289b . #x7ec6)
+ (#xeaa1 . #x27fa)
+ (#xd4ef . #x3085)
+ (#x0488 . #x1d05)
+ (#xd9d4 . #xd039)
+ (#xe6db . #x99e5)
+ (#x1fa2 . #x7cf8)
+ (#xc4ac . #x5665)
+
+ (#xf429 . #x2244)
+ (#x432a . #xff97)
+ (#xab94 . #x23a7)
+ (#xfc93 . #xa039)
+ (#x655b . #x59c3)
+ (#x8f0c . #xcc92)
+ (#xffef . #xf47d)
+ (#x8584 . #x5dd1)
+ (#x6fa8 . #x7e4f)
+ (#xfe2c . #xe6e0)
+ (#xa301 . #x4314)
+ (#x4e08 . #x11a1)
+ (#xf753 . #x7e82)
+ (#xbd3a . #xf235)
+ (#x2ad7 . #xd2bb)
+ (#xeb86 . #xd391)])
(eval-and-compile
(defun md5-rewrite (fun w x y z vec-idx shift)
@@ -227,10 +227,10 @@
(defun md5-vector (vec)
;; initialize the chaining variables
- (let ((a (cons ?\x6745 ?\x2301))
- (b (cons ?\xefcd ?\xab89))
- (c (cons ?\x98ba ?\xdcfe))
- (d (cons ?\x1032 ?\x5476))
+ (let ((a (cons #x6745 #x2301))
+ (b (cons #xefcd #xab89))
+ (c (cons #x98ba #xdcfe))
+ (d (cons #x1032 #x5476))
(v-offset 0))
(dotimes (count (/ (length vec) 16))
@@ -288,7 +288,7 @@
(incf v-offset 16))
;; swap back from LSB-first. i feel ill.
- (mapconcat #'(lambda (x) (format "%02x%02x" (logand ?\xff x) (ash x -8)))
+ (mapconcat #'(lambda (x) (format "%02x%02x" (logand #xff x) (ash x -8)))
(list (cdr a) (car a)
(cdr b) (car b)
(cdr c) (car c)
Index: xemacs-packages/ecrypto/rc16.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/ecrypto/rc16.el,v
retrieving revision 1.1
diff -u -u -r1.1 rc16.el
--- xemacs-packages/ecrypto/rc16.el 2002/06/13 18:22:11 1.1
+++ xemacs-packages/ecrypto/rc16.el 2008/07/16 20:51:54
@@ -61,7 +61,7 @@
temp1 temp2)
(while (< counter 65536)
(setq temp1 (aref state counter))
- (setq stateidx (logand ?\xffff (+ stateidx temp1 (aref key keyidx))))
+ (setq stateidx (logand #xffff (+ stateidx temp1 (aref key keyidx))))
(setq temp2 (aref state stateidx))
(aset state stateidx temp1)
(aset state counter temp2)
@@ -73,9 +73,9 @@
;; added by Ray. is this a good thing?
(defun rc16-mixin (context val)
(let* ((state (rc16-context-state context))
- (x (logand ?\xffff (1+ (rc16-context-x context))))
+ (x (logand #xffff (1+ (rc16-context-x context))))
(sx (aref state x))
- (y (logand ?\xffff
+ (y (logand #xffff
(logxor val
(+ sx (rc16-context-y context)))))
(sy (aref state y)))
@@ -88,15 +88,15 @@
;; return a random value
(defun rc16-short (context)
(let* ((state (rc16-context-state context))
- (x (logand ?\xffff (1+ (rc16-context-x context))))
+ (x (logand #xffff (1+ (rc16-context-x context))))
(sx (aref state x))
- (y (logand ?\xffff (+ sx (rc16-context-y context))))
+ (y (logand #xffff (+ sx (rc16-context-y context))))
(sy (aref state y)))
(rc16-context-set-x context x)
(rc16-context-set-y context y)
(aset state y sx)
(aset state x sy)
- (aref state (logand ?\xffff (+ sx sy)))))
+ (aref state (logand #xffff (+ sx sy)))))
(defun rc16-encrypt (context data)
(let* ((cipher (make-string (length data) 0))
Index: xemacs-packages/ecrypto/sha1-old.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/ecrypto/sha1-old.el,v
retrieving revision 1.1
diff -u -u -r1.1 sha1-old.el
--- xemacs-packages/ecrypto/sha1-old.el 2002/06/13 18:22:12 1.1
+++ xemacs-packages/ecrypto/sha1-old.el 2008/07/16 20:51:54
@@ -57,7 +57,7 @@
;; slightly hairier math when writing the length into len-string.
(dotimes (idx 4)
- (aset len-string (+ 4 idx) (logand ?\xff
+ (aset len-string (+ 4 idx) (logand #xff
(ash length (+ -21 (* 8 idx))))))
(sha1-vector
@@ -116,21 +116,21 @@
(let ((a (car val))
(b (cdr val)))
;; only three cases ever occur
- (cond ((= shift 1) (cons (logand ?\xffff (logior (ash a 1) (ash b -15)))
- (logand ?\xffff (logior (ash b 1) (ash a -15)))))
- ((= shift 5) (cons (logand ?\xffff (logior (ash a 5) (ash b -11)))
- (logand ?\xffff (logior (ash b 5) (ash a -11)))))
+ (cond ((= shift 1) (cons (logand #xffff (logior (ash a 1) (ash b -15)))
+ (logand #xffff (logior (ash b 1) (ash a -15)))))
+ ((= shift 5) (cons (logand #xffff (logior (ash a 5) (ash b -11)))
+ (logand #xffff (logior (ash b 5) (ash a -11)))))
;; shift = 30, which is a swap and a shift by 14
- (t (cons (logand ?\xffff (logior (ash b 14) (ash a -2)))
- (logand ?\xffff (logior (ash a 14) (ash b -2))))))))
+ (t (cons (logand #xffff (logior (ash b 14) (ash a -2)))
+ (logand #xffff (logior (ash a 14) (ash b -2))))))))
(defsubst sha1+ (&rest args)
;; since we only use 16 bits, there's enough room to just add
;; without carry checks for each add.
(let* ((lo (apply #'+ (mapcar #'cdr args)))
(hi (+ (ash lo -16) (apply #'+ (mapcar #'car args)))))
- (cons (logand ?\xffff hi)
- (logand ?\xffff lo))))
+ (cons (logand #xffff hi)
+ (logand #xffff lo))))
(defsubst sha1-logxor4 (a b c d)
(cons (logxor (car a) (car b) (car c) (car d))
@@ -156,11 +156,11 @@
(defun sha1-vector (vec)
;; initialize the chaining variables
- (let ((a (cons ?\x6745 ?\x2301))
- (b (cons ?\xefcd ?\xab89))
- (c (cons ?\x98ba ?\xdcfe))
- (d (cons ?\x1032 ?\x5476))
- (e (cons ?\xc3d2 ?\xe1f0))
+ (let ((a (cons #x6745 #x2301))
+ (b (cons #xefcd #xab89))
+ (c (cons #x98ba #xdcfe))
+ (d (cons #x1032 #x5476))
+ (e (cons #xc3d2 #xe1f0))
(w (make-vector 80 0))
(v-offset 0))
@@ -184,16 +184,16 @@
(dotimes (count 20)
;; (insert (format "%s %s %s %s %s\n"
;; a b c d e))
- (sha1-rewrite sha1-f1 '(?\x5a82 . ?\x7999)))
+ (sha1-rewrite sha1-f1 '(#x5a82 . #x7999)))
(dotimes (count 20)
- (sha1-rewrite sha1-f2&4 '(?\x6ed9 . ?\xeba1)))
+ (sha1-rewrite sha1-f2&4 '(#x6ed9 . #xeba1)))
(dotimes (count 20)
- (sha1-rewrite sha1-f3 '(?\x8f1b . ?\xbcdc)))
+ (sha1-rewrite sha1-f3 '(#x8f1b . #xbcdc)))
(dotimes (count 20)
- (sha1-rewrite sha1-f2&4 '(?\xca62 . ?\xc1d6)))
+ (sha1-rewrite sha1-f2&4 '(#xca62 . #xc1d6)))
(setq a (sha1+ AA a)
b (sha1+ BB b)
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghé, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Bind function-key-map correctly in device-specific startup code.
16 years, 5 months
Aidan Kehoe
changeset: 4482:e3ef34f5707072de9795fd41d05515ff57256153
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sat Jul 26 09:37:08 2008 +0200
files: lisp/ChangeLog lisp/x-init.el lisp/x-win-sun.el lisp/x-win-xfree86.el
description:
Bind function-key-map correctly in device-specific startup code.
2008-07-26 Aidan Kehoe <kehoea(a)parhasard.net>
* x-init.el (x-initialize-compose):
Rewrite to use #'loop, as does similar code in x-win-sun.el,
x-win-xfree86.el. Locally bind function-key-map to the correct
value for the device's console.
* x-win-xfree86.el (x-win-init-xfree86):
Locally bind function-key-map to the correct value for the
device's console.
* x-win-sun.el (x-win-init-sun):
Locally bind function-key-map to the correct value for the
device's console.
diff -r f9c70d94f42741543645c976bcc89aec6dc63128 -r e3ef34f5707072de9795fd41d05515ff57256153 lisp/ChangeLog
--- a/lisp/ChangeLog Sun Jul 20 15:04:20 2008 +0200
+++ b/lisp/ChangeLog Sat Jul 26 09:37:08 2008 +0200
@@ -1,3 +1,16 @@ 2008-07-20 Aidan Kehoe <kehoea@parhasa
+2008-07-26 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * x-init.el (x-initialize-compose):
+ Rewrite to use #'loop, as does similar code in x-win-sun.el,
+ x-win-xfree86.el. Locally bind function-key-map to the correct
+ value for the device's console.
+ * x-win-xfree86.el (x-win-init-xfree86):
+ Locally bind function-key-map to the correct value for the
+ device's console.
+ * x-win-sun.el (x-win-init-sun):
+ Locally bind function-key-map to the correct value for the
+ device's console.
+
2008-07-20 Aidan Kehoe <kehoea(a)parhasard.net>
* descr-text.el (describe-char-unicode-data):
diff -r f9c70d94f42741543645c976bcc89aec6dc63128 -r e3ef34f5707072de9795fd41d05515ff57256153 lisp/x-init.el
--- a/lisp/x-init.el Sun Jul 20 15:04:20 2008 +0200
+++ b/lisp/x-init.el Sat Jul 26 09:37:08 2008 +0200
@@ -84,12 +84,6 @@
;; Load X-server specific code.
;; Specifically, load some code to repair the grievous damage that MIT and
;; Sun have done to the default keymap for the Sun keyboards.
-
-(eval-when-compile
- (defmacro x-define-dead-key (key map device)
- `(when (x-keysym-on-keyboard-p ',key device)
- (define-key function-key-map [,key] ',map))))
-
(defun x-initialize-compose (device)
"Enable compose key and dead key processing on DEVICE."
(autoload 'compose-map "x-compose" nil t 'keymap)
@@ -100,111 +94,118 @@
(autoload 'compose-circumflex-map "x-compose" nil t 'keymap)
(autoload 'compose-tilde-map "x-compose" nil t 'keymap)
- (when (x-keysym-on-keyboard-p 'multi-key device)
- (define-key function-key-map [multi-key] 'compose-map))
-
- ;; The dead keys might really be called just about anything, depending
- ;; on the vendor. MIT thinks that the prefixes are "SunFA_", "D", and
- ;; "hpmute_" for Sun, DEC, and HP respectively. However, OpenWindows 3
- ;; thinks that the prefixes are "SunXK_FA_", "DXK_", and "hpXK_mute_".
- ;; And HP (who don't mention Sun and DEC at all) use "XK_mute_".
- ;; Go figure.
-
- ;; Presumably if someone is running OpenWindows, they won't be using
- ;; the DEC or HP keysyms, but if they are defined then that is possible,
- ;; so in that case we accept them all.
-
- ;; If things seem not to be working, you might want to check your
- ;; /usr/lib/X11/XKeysymDB file to see if your vendor has an equally
- ;; mixed up view of what these keys should be called.
-
- ;; Canonical names:
- (x-define-dead-key acute compose-acute-map device)
- (x-define-dead-key grave compose-grave-map device)
- (x-define-dead-key cedilla compose-cedilla-map device)
- (x-define-dead-key diaeresis compose-diaeresis-map device)
- (x-define-dead-key circumflex compose-circumflex-map device)
- (x-define-dead-key tilde compose-tilde-map device)
- (x-define-dead-key degree compose-ring-map device)
-
- ;; Sun according to MIT:
- (x-define-dead-key SunFA_Acute compose-acute-map device)
- (x-define-dead-key SunFA_Grave compose-grave-map device)
- (x-define-dead-key SunFA_Cedilla compose-cedilla-map device)
- (x-define-dead-key SunFA_Diaeresis compose-diaeresis-map device)
- (x-define-dead-key SunFA_Circum compose-circumflex-map device)
- (x-define-dead-key SunFA_Tilde compose-tilde-map device)
-
- ;; Sun according to OpenWindows 2:
- (x-define-dead-key Dead_Grave compose-grave-map device)
- (x-define-dead-key Dead_Circum compose-circumflex-map device)
- (x-define-dead-key Dead_Tilde compose-tilde-map device)
-
- ;; Sun according to OpenWindows 3:
- (x-define-dead-key SunXK_FA_Acute compose-acute-map device)
- (x-define-dead-key SunXK_FA_Grave compose-grave-map device)
- (x-define-dead-key SunXK_FA_Cedilla compose-cedilla-map device)
- (x-define-dead-key SunXK_FA_Diaeresis compose-diaeresis-map device)
- (x-define-dead-key SunXK_FA_Circum compose-circumflex-map device)
- (x-define-dead-key SunXK_FA_Tilde compose-tilde-map device)
-
- ;; DEC according to MIT:
- (x-define-dead-key Dacute_accent compose-acute-map device)
- (x-define-dead-key Dgrave_accent compose-grave-map device)
- (x-define-dead-key Dcedilla_accent compose-cedilla-map device)
- (x-define-dead-key Dcircumflex_accent compose-circumflex-map device)
- (x-define-dead-key Dtilde compose-tilde-map device)
- (x-define-dead-key Dring_accent compose-ring-map device)
-
- ;; DEC according to OpenWindows 3:
- (x-define-dead-key DXK_acute_accent compose-acute-map device)
- (x-define-dead-key DXK_grave_accent compose-grave-map device)
- (x-define-dead-key DXK_cedilla_accent compose-cedilla-map device)
- (x-define-dead-key DXK_circumflex_accent compose-circumflex-map device)
- (x-define-dead-key DXK_tilde compose-tilde-map device)
- (x-define-dead-key DXK_ring_accent compose-ring-map device)
-
- ;; HP according to MIT:
- (x-define-dead-key hpmute_acute compose-acute-map device)
- (x-define-dead-key hpmute_grave compose-grave-map device)
- (x-define-dead-key hpmute_diaeresis compose-diaeresis-map device)
- (x-define-dead-key hpmute_asciicircum compose-circumflex-map device)
- (x-define-dead-key hpmute_asciitilde compose-tilde-map device)
-
- ;; Empirically discovered on Linux XFree86 MetroX:
- (x-define-dead-key usldead_acute compose-acute-map device)
- (x-define-dead-key usldead_grave compose-grave-map device)
- (x-define-dead-key usldead_diaeresis compose-diaeresis-map device)
- (x-define-dead-key usldead_asciicircum compose-circumflex-map device)
- (x-define-dead-key usldead_asciitilde compose-tilde-map device)
-
- ;; HP according to OpenWindows 3:
- (x-define-dead-key hpXK_mute_acute compose-acute-map device)
- (x-define-dead-key hpXK_mute_grave compose-grave-map device)
- (x-define-dead-key hpXK_mute_diaeresis compose-diaeresis-map device)
- (x-define-dead-key hpXK_mute_asciicircum compose-circumflex-map device)
- (x-define-dead-key hpXK_mute_asciitilde compose-tilde-map device)
-
- ;; HP according to HP-UX 8.0:
- (x-define-dead-key XK_mute_acute compose-acute-map device)
- (x-define-dead-key XK_mute_grave compose-grave-map device)
- (x-define-dead-key XK_mute_diaeresis compose-diaeresis-map device)
- (x-define-dead-key XK_mute_asciicircum compose-circumflex-map device)
- (x-define-dead-key XK_mute_asciitilde compose-tilde-map device)
-
- ;; [[ XFree86 seems to use lower case and a hyphen ]] Not true; they use
- ;; lower case and an underscore. XEmacs converts the underscore to a
- ;; hyphen in x_keysym_to_emacs_keysym because the keysym is in the
- ;; "Keyboard" character set, which is just totally fucking random,
- ;; considering it doesn't happen for any other character sets.
- (x-define-dead-key dead-acute compose-acute-map device)
- (x-define-dead-key dead-grave compose-grave-map device)
- (x-define-dead-key dead-cedilla compose-cedilla-map device)
- (x-define-dead-key dead-diaeresis compose-diaeresis-map device)
- (x-define-dead-key dead-circum compose-circumflex-map device)
- (x-define-dead-key dead-circumflex compose-circumflex-map device)
- (x-define-dead-key dead-tilde compose-tilde-map device)
- )
+ (loop
+ for (key map)
+ ;; The dead keys might really be called just about anything, depending
+ ;; on the vendor. MIT thinks that the prefixes are "SunFA_", "D", and
+ ;; "hpmute_" for Sun, DEC, and HP respectively. However, OpenWindows 3
+ ;; thinks that the prefixes are "SunXK_FA_", "DXK_", and "hpXK_mute_".
+ ;; And HP (who don't mention Sun and DEC at all) use "XK_mute_". Go
+ ;; figure.
+
+ ;; Presumably if someone is running OpenWindows, they won't be using the
+ ;; DEC or HP keysyms, but if they are defined then that is possible, so
+ ;; in that case we accept them all.
+
+ ;; If things seem not to be working, you might want to check your
+ ;; /usr/lib/X11/XKeysymDB file to see if your vendor has an equally
+ ;; mixed up view of what these keys should be called.
+
+ ;; Canonical names:
+ in '((acute compose-acute-map)
+ (grave compose-grave-map)
+ (cedilla compose-cedilla-map)
+ (diaeresis compose-diaeresis-map)
+ (circumflex compose-circumflex-map)
+ (tilde compose-tilde-map)
+ (degree compose-ring-map)
+ (multi-key compose-map)
+
+ ;; Sun according to MIT:
+ (SunFA_Acute compose-acute-map)
+ (SunFA_Grave compose-grave-map)
+ (SunFA_Cedilla compose-cedilla-map)
+ (SunFA_Diaeresis compose-diaeresis-map)
+ (SunFA_Circum compose-circumflex-map)
+ (SunFA_Tilde compose-tilde-map)
+
+ ;; Sun according to OpenWindows 2:
+ (Dead_Grave compose-grave-map)
+ (Dead_Circum compose-circumflex-map)
+ (Dead_Tilde compose-tilde-map)
+
+ ;; Sun according to OpenWindows 3:
+ (SunXK_FA_Acute compose-acute-map)
+ (SunXK_FA_Grave compose-grave-map)
+ (SunXK_FA_Cedilla compose-cedilla-map)
+ (SunXK_FA_Diaeresis compose-diaeresis-map)
+ (SunXK_FA_Circum compose-circumflex-map)
+ (SunXK_FA_Tilde compose-tilde-map)
+
+ ;; DEC according to MIT:
+ (Dacute_accent compose-acute-map)
+ (Dgrave_accent compose-grave-map)
+ (Dcedilla_accent compose-cedilla-map)
+ (Dcircumflex_accent compose-circumflex-map)
+ (Dtilde compose-tilde-map)
+ (Dring_accent compose-ring-map)
+
+ ;; DEC according to OpenWindows 3:
+ (DXK_acute_accent compose-acute-map)
+ (DXK_grave_accent compose-grave-map)
+ (DXK_cedilla_accent compose-cedilla-map)
+ (DXK_circumflex_accent compose-circumflex-map)
+ (DXK_tilde compose-tilde-map)
+ (DXK_ring_accent compose-ring-map)
+
+ ;; HP according to MIT:
+ (hpmute_acute compose-acute-map)
+ (hpmute_grave compose-grave-map)
+ (hpmute_diaeresis compose-diaeresis-map)
+ (hpmute_asciicircum compose-circumflex-map)
+ (hpmute_asciitilde compose-tilde-map)
+
+ ;; Empirically discovered on Linux XFree86 MetroX:
+ (usldead_acute compose-acute-map)
+ (usldead_grave compose-grave-map)
+ (usldead_diaeresis compose-diaeresis-map)
+ (usldead_asciicircum compose-circumflex-map)
+ (usldead_asciitilde compose-tilde-map)
+
+ ;; HP according to OpenWindows 3:
+ (hpXK_mute_acute compose-acute-map)
+ (hpXK_mute_grave compose-grave-map)
+ (hpXK_mute_diaeresis compose-diaeresis-map)
+ (hpXK_mute_asciicircum compose-circumflex-map)
+ (hpXK_mute_asciitilde compose-tilde-map)
+
+ ;; HP according to HP-UX 8.0:
+ (XK_mute_acute compose-acute-map)
+ (XK_mute_grave compose-grave-map)
+ (XK_mute_diaeresis compose-diaeresis-map)
+ (XK_mute_asciicircum compose-circumflex-map)
+ (XK_mute_asciitilde compose-tilde-map)
+
+ ;; [[ XFree86 seems to use lower case and a hyphen ]] Not true;
+ ;; they use lower case and an underscore. XEmacs converts the
+ ;; underscore to a hyphen in x_keysym_to_emacs_keysym because the
+ ;; keysym is in the "Keyboard" character set, which is just totally
+ ;; fucking random, considering it doesn't happen for any other
+ ;; character sets.
+ (dead-acute compose-acute-map)
+ (dead-grave compose-grave-map)
+ (dead-cedilla compose-cedilla-map)
+ (dead-diaeresis compose-diaeresis-map)
+ (dead-circum compose-circumflex-map)
+ (dead-circumflex compose-circumflex-map)
+ (dead-tilde compose-tilde-map))
+
+ ;; Get the correct value for function-key-map
+ with function-key-map = (symbol-value-in-console 'function-key-map
+ (device-console device)
+ function-key-map)
+ do (when (x-keysym-on-keyboard-p key device)
+ (define-key function-key-map (vector key) map))))
(eval-when-compile
(load "x-win-sun" nil t)
diff -r f9c70d94f42741543645c976bcc89aec6dc63128 -r e3ef34f5707072de9795fd41d05515ff57256153 lisp/x-win-sun.el
--- a/lisp/x-win-sun.el Sun Jul 20 15:04:20 2008 +0200
+++ b/lisp/x-win-sun.el Sat Jul 26 09:37:08 2008 +0200
@@ -156,6 +156,10 @@
(f11 stop)
(f12 again))))
)
+ ;; Get the correct value for function-key-map
+ with function-key-map = (symbol-value-in-console 'function-key-map
+ (device-console device)
+ function-key-map)
do (when (x-keysym-on-keyboard-sans-modifiers-p from-key device)
(dolist (prefix '(() (shift) (control) (meta) (alt)
(shift control) (shift alt) (shift meta)
diff -r f9c70d94f42741543645c976bcc89aec6dc63128 -r e3ef34f5707072de9795fd41d05515ff57256153 lisp/x-win-xfree86.el
--- a/lisp/x-win-xfree86.el Sun Jul 20 15:04:20 2008 +0200
+++ b/lisp/x-win-xfree86.el Sat Jul 26 09:37:08 2008 +0200
@@ -90,6 +90,11 @@
(f22 f10)
(f23 f11)
(f24 f12))
+ ;; Get the correct value for function-key-map
+ with function-key-map = (symbol-value-in-console 'function-key-map
+ (device-console device)
+ function-key-map)
+
do
(when (and (x-keysym-on-keyboard-p key device)
(not (x-keysym-on-keyboard-sans-modifiers-p key device)))
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[AC21.5] Add data for 3 Xft charsets
16 years, 5 months
Stephen J. Turnbull
APPROVE COMMIT 21.5
diff -r f9c70d94f427 src/ChangeLog
--- a/src/ChangeLog Sun Jul 20 15:04:20 2008 +0200
+++ b/src/ChangeLog Wed Jul 23 11:53:53 2008 -0700
@@ -1,0 +1,5 @@
+2008-07-23 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * objects-xlike-inc.c (charset_table): Add names and ISO 639 codes
+ for Arabic, Russian, and Thai.
+
diff -r f9c70d94f427 src/objects-xlike-inc.c
--- a/src/objects-xlike-inc.c Sun Jul 20 15:04:20 2008 +0200
+++ b/src/objects-xlike-inc.c Wed Jul 23 11:53:54 2008 -0700
@@ -351,16 +351,21 @@
{ &Vcharset_korean_ksc5601, "Korean", "ko" },
{ &Vcharset_chinese_cns11643_1, "traditional Chinese", "zh-TW" },
{ &Vcharset_chinese_cns11643_2, "traditional Chinese", "zh-TW" },
+ /* #### not obvious how to handle these
+ We could (for experimental purposes) make the last element into
+ an array of ISO 639 codes, and check for all of them. If a font
+ provides some but not others, warn. */
{ &Vcharset_latin_iso8859_1, NULL, NULL },
{ &Vcharset_latin_iso8859_2, NULL, NULL },
{ &Vcharset_latin_iso8859_3, NULL, NULL },
{ &Vcharset_latin_iso8859_4, NULL, NULL },
{ &Vcharset_latin_iso8859_9, NULL, NULL },
{ &Vcharset_latin_iso8859_15, NULL, NULL },
- { &Vcharset_thai_tis620, NULL, NULL },
- { &Vcharset_arabic_iso8859_6, NULL, NULL },
+ { &Vcharset_thai_tis620, "Thai", "th" },
+ { &Vcharset_arabic_iso8859_6, "Arabic", "ar" },
{ &Vcharset_hebrew_iso8859_8, "Hebrew", "he" },
- { &Vcharset_cyrillic_iso8859_5, NULL, NULL },
+ /* #### probably close enough for Ukraine? */
+ { &Vcharset_cyrillic_iso8859_5, "Russian", "ru" },
/* #### these probably are not quite right */
{ &Vcharset_chinese_big5_1, "traditional Chinese", "zh-TW" },
{ &Vcharset_chinese_big5_2, "traditional Chinese", "zh-TW" },
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Correct syntax of #'error calls, descr-text.el
16 years, 5 months
Aidan Kehoe
changeset: 4481:f9c70d94f42741543645c976bcc89aec6dc63128
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sun Jul 20 15:04:20 2008 +0200
files: lisp/ChangeLog lisp/descr-text.el
description:
Correct syntax of #'error calls, descr-text.el
2008-07-20 Aidan Kehoe <kehoea(a)parhasard.net>
* descr-text.el (describe-char-unicode-data):
Correct three calls to #'error; it doesn't take #'message style
format strings and arguments.
diff -r 74caf140505b589959374ba69b7e5cfd5a38aadf -r f9c70d94f42741543645c976bcc89aec6dc63128 lisp/ChangeLog
--- a/lisp/ChangeLog Sat Jul 19 15:19:59 2008 +0200
+++ b/lisp/ChangeLog Sun Jul 20 15:04:20 2008 +0200
@@ -1,3 +1,9 @@ 2008-07-19 Aidan Kehoe <kehoea@parhasa
+2008-07-20 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * descr-text.el (describe-char-unicode-data):
+ Correct three calls to #'error; it doesn't take #'message style
+ format strings and arguments.
+
2008-07-19 Aidan Kehoe <kehoea(a)parhasard.net>
* descr-text.el (describe-property-list): Move the (require
diff -r 74caf140505b589959374ba69b7e5cfd5a38aadf -r f9c70d94f42741543645c976bcc89aec6dc63128 lisp/descr-text.el
--- a/lisp/descr-text.el Sat Jul 19 15:19:59 2008 +0200
+++ b/lisp/descr-text.el Sun Jul 20 15:04:20 2008 +0200
@@ -677,7 +677,8 @@ The list is null if CHAR isn't found in
(when describe-char-unicodedata-file
(unless (file-exists-p describe-char-unicodedata-file)
(error 'file-error
- "`unicodedata-file' %s not found" describe-char-unicodedata-file))
+ (format "`unicodedata-file' %s not found"
+ describe-char-unicodedata-file)))
;; XEmacs change; accept a character argument, use the cache if
;; appropriate.
(when (characterp char)
@@ -697,13 +698,14 @@ The list is null if CHAR isn't found in
(coding-system-for-read 'no-conversion-unix)
key lookup)
(unless database-handle
- (error 'io-error "Could not open %s as a %s database"
- (unidata-generate-database-file-name
- describe-char-unicodedata-file
- (eighth (file-attributes
- describe-char-unicodedata-file))
- unidata-database-format)
- unidata-database-format))
+ (error 'io-error
+ (format "Could not open %s as a %s database"
+ (unidata-generate-database-file-name
+ describe-char-unicodedata-file
+ (eighth (file-attributes
+ describe-char-unicodedata-file))
+ unidata-database-format)
+ unidata-database-format)))
(setq key (format "%04X" char)
lookup (get-database key database-handle))
(if lookup
@@ -761,7 +763,8 @@ The list is null if CHAR isn't found in
(unless (or (= 13 (length fields))
(= 14 (length fields)))
(error 'invalid-argument
- "Invalid contents in %s" describe-char-unicodedata-file))
+ (format "Invalid contents in %s"
+ describe-char-unicodedata-file)))
;; The field names and values lists are slightly
;; modified from Mule-UCS unidata.el.
(apply #'list
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Wrap field descriptions, descr-text.el; name created buffer more uniquely.
16 years, 5 months
Aidan Kehoe
changeset: 4480:74caf140505b589959374ba69b7e5cfd5a38aadf
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sat Jul 19 15:19:59 2008 +0200
files: lisp/ChangeLog lisp/descr-text.el
description:
Wrap field descriptions, descr-text.el; name created buffer more uniquely.
2008-07-19 Aidan Kehoe <kehoea(a)parhasard.net>
* descr-text.el (describe-property-list): Move the (require
'hyper-apropos) call to top level, this isn't the only function
that uses the relevant face.
(describe-char): Wrap the Unihan field descriptions if they are
longer than the windows width minus 50.
Rename the created buffer to reflect the character's position as
well as its value.
diff -r 4cb7c59b5201ae584dfe081c131e5f20de3eab7e -r 74caf140505b589959374ba69b7e5cfd5a38aadf lisp/ChangeLog
--- a/lisp/ChangeLog Thu Jul 17 22:50:22 2008 +0200
+++ b/lisp/ChangeLog Sat Jul 19 15:19:59 2008 +0200
@@ -1,3 +1,13 @@ 2008-07-07 Aidan Kehoe <kehoea@parhasa
+2008-07-19 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * descr-text.el (describe-property-list): Move the (require
+ 'hyper-apropos) call to top level, this isn't the only function
+ that uses the relevant face.
+ (describe-char): Wrap the Unihan field descriptions if they are
+ longer than the windows width minus 50.
+ Rename the created buffer to reflect the character's position as
+ well as its value.
+
2008-07-07 Aidan Kehoe <kehoea(a)parhasard.net>
Patch to make it up to the device-specific code whether
diff -r 4cb7c59b5201ae584dfe081c131e5f20de3eab7e -r 74caf140505b589959374ba69b7e5cfd5a38aadf lisp/descr-text.el
--- a/lisp/descr-text.el Thu Jul 17 22:50:22 2008 +0200
+++ b/lisp/descr-text.el Sat Jul 19 15:19:59 2008 +0200
@@ -31,6 +31,8 @@
;;; Code:
(eval-when-compile (require 'wid-edit))
+
+(require 'hyper-apropos)
;;; Describe-Text Utilities.
@@ -82,7 +84,6 @@ into help buttons that call `describe-te
into help buttons that call `describe-text-category' or
`describe-face' when pushed."
;; Sort the properties by the size of their value.
- (require 'hyper-apropos)
(dolist (elt (sort (let (ret)
(while properties
(push (list (pop properties) (pop properties)) ret))
@@ -1029,7 +1030,8 @@ as well as widgets, buttons, overlays, a
(describe-text-properties pos tmp-buf)
(with-current-buffer tmp-buf (buffer-string)))
(kill-buffer tmp-buf))))
- item-list max-width unicode unicode-formatted unicode-error)
+ item-list max-width unicode unicode-formatted unicode-error
+ unicodedata (max-unicode-description-width (- (window-width) 50)))
(setq unicode-error
@@ -1185,13 +1187,29 @@ as well as widgets, buttons, overlays, a
`(insert-gui-button
(make-gui-button
,(symbol-name face)))))))
- ,@(let ((unicodedata (and unicode
- (describe-char-unicode-data unicode))))
+ ,@(progn
+ (setq unicodedata (and unicode
+ (describe-char-unicode-data unicode)))
(if unicodedata
(cons (list "Unicode data" " ") unicodedata)))))
(setq max-width (apply #'max (mapcar #'(lambda (x)
(if (cadr x) (length (car x)) 0))
item-list)))
+ (when (and unicodedata (> max-width max-unicode-description-width))
+ (setq max-width max-unicode-description-width)
+ (with-temp-buffer
+ (let ((fill-column max-unicode-description-width)
+ (indent-tabs-mode nil))
+ (dolist (unidata-line unicodedata)
+ (when (cadr unidata-line)
+ (setf (car unidata-line)
+ (progn (insert (car unidata-line))
+ (goto-char (point-min))
+ (fill-paragraph 'right)
+ (delete-region (1- (point-max))
+ (point-max))
+ (buffer-string)))
+ (delete-region (point-min) (point-max)))))))
; (help-setup-xref nil (interactive-p))
(with-displaying-help-buffer
(lambda ()
@@ -1274,7 +1292,7 @@ as well as widgets, buttons, overlays, a
; (setq help-xref-stack-item (list 'help-insert-string (buffer-string)))
(toggle-read-only 1)
(print-help-return-message)))
- (format "Describe %c" (char-after pos)))))
+ (format "Describe %c <%d>" (char-after pos) pos))))
(defalias 'describe-char-after 'describe-char)
(make-obsolete 'describe-char-after 'describe-char "22.1")
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches