From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: chris@grierwhite.com (Christopher J. White) Newsgroups: gmane.emacs.help Subject: Re: Newbie Conditional Problem Date: Sat, 18 Jan 2003 08:48:05 -0500 Organization: Posted via Supernews, http://www.supernews.com Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <87ptqvokj8.fsf@fbigm.here> <873cnr7z1a.fsf@fbigm.here> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1042897770 16710 80.91.224.249 (18 Jan 2003 13:49:30 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 18 Jan 2003 13:49:30 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18ZtLl-0004LO-00 for ; Sat, 18 Jan 2003 14:49:29 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18ZtMy-0006af-01 for gnu-help-gnu-emacs@m.gmane.org; Sat, 18 Jan 2003 08:50:44 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!cyclone.bc.net!snoopy.risq.qc.ca!newsfeed.news2me.com!sn-xit-02!sn-xit-06!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (powerpc-apple-darwin) Cancel-Lock: sha1:7Tt65TgU4D55e8mwwS7ct88pEpE= Original-X-Complaints-To: abuse@supernews.com Original-Lines: 27 Original-Xref: shelby.stanford.edu gnu.emacs.help:109119 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:5646 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:5646 >>>>> "fd" == Friedrich Dominicus 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. 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. ...cj -- ------------------------------------------------------------------------------ Christopher J. White chris@grierwhite.com ------------------------------------------------------------------------------