edwinallenz
edwinallenz

Reputation: 453

emacs position of the first char in a word

Hi is there a function to get the first char position of a word Like using backward-word but just to know the char position insted of going backward.

Thanks in advance.

Upvotes: 2

Views: 73

Answers (2)

Drew
Drew

Reputation: 30708

Another answer (no better than @edwinallenz's answer):

(car (bounds-of-thing-at-point 'word))

Upvotes: 3

edwinallenz
edwinallenz

Reputation: 453

I found it

(save-excursion (backward-word) (point))

Upvotes: 2

Related Questions