Kenichi Handa wrote: > In article <[EMAIL PROTECTED]>, Nick Roberts <[EMAIL PROTECTED]> writes:
>> It doesn't on Emacs 22: >> (char-or-string-p -4) >> t >> and if it does on Emacs 23 then I think that must be the bug. > Emacs 23 surely returns nil in that case. I think the > behaviour of Emacs 22 is a bug (or at least very confusing). > Don't people think OBJ can be safely used as an argument of > a function that expects a character (e.g. insert, > char-to-string) if (char-or-string-p OBJ) is true? This also throws up a further problem in the Emacs 23 branch: emacs -Q M-: (insert -1) RET resulting in a segmentation fault. The problem appears to lie in the code-path to char_string(), the code does not seem to check to see if the "character" to be inserted is valid: specifically, negative arguments cause the stack to overflow (I think). char_string(c, p) calls CHAR_STRING(c, p), which, since c is negative, calls char_string(c, p) as a fallback. I'm not sure how to go about fixing this, the naive approach of calling CHECK_CHARACTER at the beginning of char_string results in a segfault when building. [...] Cheers, Lawrence -- Lawrence Mitchell <[EMAIL PROTECTED]> _______________________________________________ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug