unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Friedrich Dominicus <frido@q-software-solutions.com>
Subject: Re: Newbie Conditional Problem
Date: 18 Jan 2003 18:03:45 +0100	[thread overview]
Message-ID: <87u1g6gzke.fsf@fbigm.here> (raw)
In-Reply-To: m2k7h2tvqi.fsf@bluesteel.grierwhite.com

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

  reply	other threads:[~2003-01-18 17:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-17 15:19 Newbie Conditional Problem CarlC
2003-01-17 15:36 ` Friedrich Dominicus
2003-01-17 16:09   ` CarlC
2003-01-18  6:27     ` Friedrich Dominicus
2003-01-18 13:35       ` Johan Bockgård
2003-01-18 16:59         ` Friedrich Dominicus
2003-01-18 13:48       ` Christopher J. White
2003-01-18 17:03         ` Friedrich Dominicus [this message]
2003-01-17 16:19 ` Brendan Halpin
     [not found] ` <x54r87zrdo.fsf@lola.goethe.zz>
2003-01-17 16:46   ` CarlC
2003-01-17 16:52     ` David Kastrup
2003-01-17 17:24       ` CarlC
2003-01-17 17:42 ` Stefan Monnier <foo@acm.com>
2003-01-18 17:36 ` Kai Großjohann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87u1g6gzke.fsf@fbigm.here \
    --to=frido@q-software-solutions.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).