[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Get char at point
From: |
AmosBurke |
Subject: |
Re: Get char at point |
Date: |
Wed, 08 Dec 2010 15:19:06 -0000 |
User-agent: |
G2/1.0 |
On Jul 17, 1:55 am, Harald Hanche-Olsen <han...@math.ntnu.no> wrote:
> + TheFlyingDutchman <zzbba...@aol.com>:
>
> > Is there a function to get the character at point? I see get-byte,
> > which would work for an ASCII coded file, but I believe Emacs has some
> > support for multi-byte character sets.
>
> If you type C-h f char TAB, you will see a bunch of functions whose
> names begin with "char". Then you might wildly guess that the first hit,
> char-after, is what you are looking for, and if you actually select
> that, the wild guess is confirmed.
>
> --
> * Harald Hanche-Olsen <URL:http://www.math.ntnu.no/~hanche/>
> - It is undesirable to believe a proposition
> when there is no ground whatsoever for supposing it is true.
> -- Bertrand Russell
Thanks! I believe I did look at the char* functions. If it had been
named char-at I would have gotten it. It should be noted that the help
for "char-after" says
--------------------------------------------------------------------------------
(char-after &optional POS)
Return character in current buffer at position POS.
POS is an integer or a marker and defaults to point.
If POS is out of range, the value is nil.
----------------------------------------------------------------------------
The concept of "point" being between characters, was unfortunately
followed in naming the function, and then luckily ignored in the help
for the function.