To leave alone the ?\xAAAA question the problem is with `defvar' treatment of
documentation. If you look at the code of Fdefvar you'll find that
if (!NILP (args = XCDR (args)))
{
Lisp_Object doc = XCAR (args);
Fput (sym, Qvariable_documentation, doc);
if (!NILP (args = XCDR (args)))
signal_error (Qwrong_number_of_arguments, "too many arguments",
Qunbound);
}
When documentation property is an integer it is treated by
`documentation-property' as a position in the standard doc file. This caused
obscure results from my posting.
May be defvar should be a little more careful about docstring specification?
Nickolay.
intro: "SJT" == Stephen J Turnbull <stephen(a)xemacs.org> writes:
>>>>> "Nickolay" == Nickolay Pakoulin
<npak(a)ispras.ru> writes:
Nickolay> (defvar aaa ?\x9216)
SJT> This is parsed as (defvar aaa ?\x92 16).
SJT> You maybe should be getting a syntax error, since (char-int-p #x9216)
SJT> returns nil, even in Mule. However, '(?car) => (?c ar). And almost
SJT> surely defvar should complain bitterly about a non-string as a
SJT> docstring.
SJT> I'll document this in the manuals. "GNU compatibility" is never
going
SJT> to happen here. (However, if the noises Ken'ichi Handa is making mean
SJT> anything, "XEmacs compatibility" may very well happen to GNU Emacs.)
> From lread.c:
SJT> case '0': case '1': case '2': case '3': case
'4': case '5': case '6':
SJT> case '7': /* An octal escape, as in ANSI C. */ { REGISTER Ichar i = c
-
SJT> '0'; REGISTER int count = 0; while (++count < 3) { if ((c = readchar
SJT> (readcharfun)) >= '0' && c <= '7') i = (i <<
3) + (c - '0'); else {
SJT> unreadchar (readcharfun, c); break; } } if (i >= 0400) syntax_error
SJT> ("Attempt to create non-ASCII/ISO-8859-1 character", make_int (i));
SJT> return i; }
SJT> case 'x': /* A hex escape, as in ANSI C, except that we only allow
SJT> latin-1 characters to be read this way. What is "\x4e03" supposed to
SJT> mean, anyways, if the internal representation is hidden? This is also
SJT> consistent with the treatment of octal escapes. */ { REGISTER Ichar i =
SJT> 0; REGISTER int count = 0; while (++count <= 2)
SJT> -- Institute of Policy and Planning Sciences
SJT>
http://turnbull.sk.tsukuba.ac.jp University of Tsukuba Tennodai 1-1-1
SJT> Tsukuba 305-8573 JAPAN Ask not how you can "do" free software
business;
SJT> ask what your business can "do for" free software.