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

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

bug#7006: Reader oddity after ?\^ --- should signal error if invalid ins


From: MON KEY
Subject: bug#7006: Reader oddity after ?\^ --- should signal error if invalid instead of being garbage
Date: Thu, 9 Sep 2010 22:51:32 -0400

,----
| Currently, the reader outputs a nonsense value in this case.
| Instead, the reader ought to signal an error.
`----

Not entirely nonsensical.

 (let ((^5 (get-buffer-create "#^")))
   (with-current-buffer (get-buffer ^5)
     (save-excursion
       (erase-buffer)
       (princ "address@hidden    ?\\^5" (current-buffer))))
   (unwind-protect
       (char-to-string
        (- (read (get-buffer ^5)) (expt 2 26)))
     (with-current-buffer (get-buffer ^5)
       (kill-buffer (current-buffer)))))
 ;=> "5"

:NOTE :bit 27 :byte 4 :2^ 26 :bit-weight 67108864
      :bit-oct #o400000000   :bit-hex #x4000000

--
/s_P\





reply via email to

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