[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Newbie Conditional Problem
From: |
Friedrich Dominicus |
Subject: |
Re: Newbie Conditional Problem |
Date: |
18 Jan 2003 18:03:45 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Native Windows TTY Support) |
chris@grierwhite.com (Christopher J. White) writes:
> >>>>> "fd" == Friedrich Dominicus <frido@q-software-solutions.com> writes:
>
> fd> let us try to understand your code
>
> fd> (let ((line (current-line))) ;; this give you a simple number with my
> fd> current-line (if that is what you want)
> fd> (forward-word 1) moves forward onw word from point
> fd> (if (> (current-line) line) ;; if we moved one line down
> fd> ;; assuming you meant
> fd> (progn (goto-line line) (end-of-line))))
> fd> ;; this means go back one line (back to the line you started from
>
> fd> But what does it give you? It makes no sense. The code just moves you
> fd> to the end of the current line that is simply to call (end-of-line)
> fd> not more
>
> As I understand it, it's a forward-word function that keeps the
> cursor on the current line.
Well I suggest you try it go to the end of a line and run
M-x forward-word you'll be on the next line after the first word.
In this case
is current-line > line -> I go back one line with (goto-line) and
there I move to the end of the line if I' do not move down line
nothing will happens. So what is it if you move move forward a word
and move down a line you go back and than to the end of the current
line. That makes no sénse.
> If forward-word would move the cursor
> beyond the current line, just go to the end of the (current) line.
> Could be useful I suppose.
For what?
Friedrich
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, 2003/01/18