emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: printing most-negative-fixnum fails


From: Richard Stallman
Subject: Re: printing most-negative-fixnum fails
Date: Tue, 11 May 2004 08:23:31 -0400

    > 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);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]