From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Friedrich Dominicus Newsgroups: gmane.emacs.help Subject: Re: Newbie Conditional Problem Date: 18 Jan 2003 18:03:45 +0100 Organization: Q Software Solutions GmbH Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87u1g6gzke.fsf@fbigm.here> References: <873cnr7z1a.fsf@fbigm.here> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1042909553 16787 80.91.224.249 (18 Jan 2003 17:05:53 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 18 Jan 2003 17:05:53 +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 18ZwPo-0004Mc-00 for ; Sat, 18 Jan 2003 18:05:52 +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 18ZwQ7-000291-0A for gnu-help-gnu-emacs@m.gmane.org; Sat, 18 Jan 2003 12:06:11 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.isc.org!sjc70.webusenet.com!news.webusenet.com!news.tele.dk!news.tele.dk!small.news.tele.dk!fr.usenet-edu.net!usenet-edu.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 36 Original-X-Trace: news.t-online.com 1042909168 00 7178 kzbYEvwSTHYpSP 030118 16:59:28 Original-X-Complaints-To: abuse@t-online.com X-Sender: 320004655587-0001@t-dialin.net User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Native Windows TTY Support) Original-Xref: shelby.stanford.edu gnu.emacs.help:109127 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:5653 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:5653 chris@grierwhite.com (Christopher J. White) writes: > >>>>> "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. 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