[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Wed, 01 Oct 2008 09:36:29 -0400
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
>> Ah! How about something like this?
>> (defun get-byte (pos &optional string)
>> "Return a byte at position POS of the current buffer..
>> If POS is nil, it defaults to point.
>> If the second optional arg STRING is non-nil, return a byte in
>> STRING at index POS.
>> An error is signaled if the character at POS is not ASCII
>> nor eight-bit character."
> Yes, that's what I had in mind.
It really seems to me that encode-char is a better solution. More to
the point it's the most natural and flexible solution. E.g. it's
trivial to write get-byte using encode-char, whereas it's much less
trivial to write encode-char with get-byte.