[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Newbie Conditional Problem
From: |
Kai Großjohann |
Subject: |
Re: Newbie Conditional Problem |
Date: |
Sat, 18 Jan 2003 18:36:08 +0100 |
User-agent: |
Gnus/5.090013 (Oort Gnus v0.13) Emacs/21.3.50 (i686-pc-linux-gnu) |
"CarlC" <carlc@snowbd.com> writes:
> (let ((line (current-line)))
> (forward-word 1)
> (if (> (current-line) line) ((goto-line line) (end-of-line))))
How about this:
(let ((p (line-end-position)))
(forward-word 1)
(when (> (point) p) (goto-char p)))
If your Emacs does not have the function line-end-position, you can
write (save-excursion (end-of-line) (point)) instead.
--
Ambibibentists unite!
Re: Newbie Conditional Problem, Brendan Halpin, 2003/01/17
Re: Newbie Conditional Problem, David Kastrup, 2003/01/17
Re: Newbie Conditional Problem, Stefan Monnier <address@hidden>, 2003/01/17
Re: Newbie Conditional Problem,
Kai Großjohann <=