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

[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!


reply via email to

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