From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: printing most-negative-fixnum fails Date: Tue, 11 May 2004 08:23:31 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <200405062008.i46K8x4R015248@brains.moreideas.ca> <87vfj3g1kv.fsf@mail.jurta.org> Reply-To: rms@gnu.org NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1084280876 4432 80.91.224.253 (11 May 2004 13:07:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 11 May 2004 13:07:56 +0000 (UTC) Cc: emacs@whaite.ca, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue May 11 15:07:51 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BNWz9-0003Hg-00 for ; Tue, 11 May 2004 15:07:51 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BNWz8-00042p-00 for ; Tue, 11 May 2004 15:07:51 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BNWYt-00033M-8m for emacs-devel@quimby.gnus.org; Tue, 11 May 2004 08:40:43 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BNWIq-0001Cx-Ct for emacs-devel@gnu.org; Tue, 11 May 2004 08:24:08 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BNWIH-00014o-9P for emacs-devel@gnu.org; Tue, 11 May 2004 08:24:05 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BNWIG-000149-Ha for emacs-devel@gnu.org; Tue, 11 May 2004 08:23:32 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1BNWIF-0008SK-U1; Tue, 11 May 2004 08:23:32 -0400 Original-To: Juri Linkov In-reply-to: <87vfj3g1kv.fsf@mail.jurta.org> (message from Juri Linkov on Tue, 11 May 2004 03:17:52 +0300) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:23136 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:23136 > Minor annoyance is that evaluating most-negative-fixnum in *scratch* > (Lisp Interaction mode) fails... This bug is caused by calling `(downcase most-negative-fixnum)' in `event-modifiers' called from `prin1-char'. The bug exists because the range of integers is greater and there are bits above the character flags. So I put the change below into casefiddle.c. I remember it was agreed some time ago that by default C-x C-e should not display numbers as characters to avoid all related problems. Who agreed on that? It seems to me that this feature is useful and harmless, and that the extra complexity of adding an option to disable it is not worth while. We have to fix these bugs anyway, so the option won't save us any work. *** casefiddle.c 11 Sep 2003 09:51:06 -0400 1.44 --- casefiddle.c 11 May 2004 08:04:28 -0400 *************** *** 52,57 **** --- 52,63 ---- | CHAR_SHIFT | CHAR_CTL | CHAR_META); int flags = XINT (obj) & flagbits; + /* If the character has higher bits set + above the flags, return it unchanged. + It is not a real character. */ + if ((unsigned) XFASTINT (obj) > (unsigned) flagbits) + return obj; + c = DOWNCASE (XFASTINT (obj) & ~flagbits); if (inword) XSETFASTINT (obj, c | flags);