emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: infloop in skeleton-insert


From: Nick Roberts
Subject: Re: infloop in skeleton-insert
Date: Wed, 11 Apr 2007 00:51:00 +1200

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

Emacs 21 appears to have the same behaviour.

 > 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?

The manual says:

   A "character" in Emacs Lisp is nothing more than an integer.

That would have to change.

And continues with:

                                                                 In
  other words, characters are represented by their character codes.  For
  example, the character `A' is represented as the integer 65.

Perhaps the `character' -4 just doesn't have a representation/character code.

I also find this confusing:

(eq 1 1)
t

(eq 1.0 1.0)
nil

but perhaps "Ours is not to reason why..."


-- 
Nick                                           http://www.inet.net.nz/~nickrob




reply via email to

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