From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: waterloo Newsgroups: gmane.emacs.help Subject: about "forward-paragraph" in Intro to emacs lisp. Date: Mon, 27 Jul 2009 03:01:28 +0800 Message-ID: <907065090907261201w367c2ee1p817403cd7f5299f5@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001636e0a774fbfbaf046fa076e5 X-Trace: ger.gmane.org 1248634924 22608 80.91.229.12 (26 Jul 2009 19:02:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 26 Jul 2009 19:02:04 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jul 26 21:01:57 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MV8yr-0007sg-4v for geh-help-gnu-emacs@m.gmane.org; Sun, 26 Jul 2009 21:01:57 +0200 Original-Received: from localhost ([127.0.0.1]:52839 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MV8yq-0006rM-17 for geh-help-gnu-emacs@m.gmane.org; Sun, 26 Jul 2009 15:01:56 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MV8yV-0006r3-CW for help-gnu-emacs@gnu.org; Sun, 26 Jul 2009 15:01:35 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MV8yR-0006qj-0u for help-gnu-emacs@gnu.org; Sun, 26 Jul 2009 15:01:34 -0400 Original-Received: from [199.232.76.173] (port=37470 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MV8yQ-0006qg-Qk for help-gnu-emacs@gnu.org; Sun, 26 Jul 2009 15:01:30 -0400 Original-Received: from wf-out-1314.google.com ([209.85.200.168]:20260) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MV8yQ-0001qp-48 for help-gnu-emacs@gnu.org; Sun, 26 Jul 2009 15:01:30 -0400 Original-Received: by wf-out-1314.google.com with SMTP id 23so782222wfg.24 for ; Sun, 26 Jul 2009 12:01:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=q0s9bHsoNFh46XQDpPldr3IZDjCAhOC7ReuEIVJ/fKs=; b=YsS+8kmlhYgxpcTg4Lw5f834KdyfQaCJ24Smbdwfl3A+3NUDla5T+Xt5hN7Yv+jLKW jD7qiw2yY6sS/GrkanXP0R7zojCN1hA/4UgtKWVvb9oxcqlR6EAW0upJ0BBqRtr8bQSW vgrVOaYCcX9Qt47fmIyPVElllf6Zl7DGnQyXE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Z5j5YXMYu2Z7+/LrP2HuapU6DqyCY/EbuvBiqnF357IH7RyRSc4UtdY0vOGnRBft5q WRkec5vOOGNaTfUU3KwXcG8jAwxT2M1jzyyZ5E5oMHy9cdyPOnWk8fiZzcD2qM/mv9yI UVY3NZG+Th05s4pmCG+ygBpTBD/McLNTo6scY= Original-Received: by 10.143.1.12 with SMTP id d12mr969214wfi.55.1248634888518; Sun, 26 Jul 2009 12:01:28 -0700 (PDT) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:66402 Archived-At: --001636e0a774fbfbaf046fa076e5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I can not understand code of forward-paragraph in Intro to emacs lisp. On " The forward motion `while' loop " of 12.4 in Intro to emacs lisp. ------------------------------- ;; going forwards and not at the end of the buffer (while (and (> arg 0) (not (eobp))) ;; between paragraphs ;; Move forward over separator lines... (while (and (not (eobp)) (progn (move-to-left-margin) (not (eobp))) (looking-at parsep)) (forward-line 1)) ;; This decrements the loop (unless (eobp) (setq arg (1- arg))) ;; ... and one more line. (forward-line 1) ----------------------------------------------------- Why need "(progn (move-to-left-margin) (not (eobp))) " ? Why need the last line " (forward-line 1) " ? Thanks --001636e0a774fbfbaf046fa076e5 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I can not understand code of forward-paragraph in Intro to emacs lisp.
<= br>On " The forward motion `while' loop " of 12.4 in Intro to= emacs lisp.
-------------------------------
=A0=A0=A0=A0 ;; going fo= rwards and not at the end of the buffer
=A0=A0=A0=A0 (while (and (> arg 0) (not (eobp)))

=A0=A0=A0=A0=A0= =A0 ;; between paragraphs
=A0=A0=A0=A0=A0=A0 ;; Move forward over separa= tor lines...
=A0=A0=A0=A0=A0=A0 (while (and (not (eobp))=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (progn (move-to-lef= t-margin) (not (eobp)))
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (looking-at parsep))=
=A0=A0=A0=A0=A0=A0=A0=A0 (forward-line 1))
=A0=A0=A0=A0=A0=A0 ;;=A0 = This decrements the loop
=A0=A0=A0=A0=A0=A0 (unless (eobp) (setq arg (1-= arg)))
=A0=A0=A0=A0=A0=A0 ;; ... and one more line.
=A0=A0=A0=A0=A0= =A0 (forward-line 1)
-----------------------------------------------------

Why need "= ;(progn (move-to-left-margin) (not (eobp))) " ?
Why need the last l= ine " (forward-line 1) " ?

Thanks
--001636e0a774fbfbaf046fa076e5--