From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Yohann Pitrey Newsgroups: gmane.emacs.help,gmane.emacs.devel Subject: Re: paragraph fill and wrong number of arguments Date: Tue, 24 Apr 2007 16:14:35 +0200 Message-ID: <462E10CB.3060200@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1177424052 32738 80.91.229.12 (24 Apr 2007 14:14:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 24 Apr 2007 14:14:12 +0000 (UTC) To: help-gnu-emacs@gnu.org, Emacs-devel@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Apr 24 16:14:11 2007 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 1HgLmU-0000hN-1s for geh-help-gnu-emacs@m.gmane.org; Tue, 24 Apr 2007 16:14:10 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HgLrz-0005bZ-Rm for geh-help-gnu-emacs@m.gmane.org; Tue, 24 Apr 2007 10:19:51 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HgLrm-0005Zg-Nu for help-gnu-emacs@gnu.org; Tue, 24 Apr 2007 10:19:38 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HgLrk-0005ZI-91 for help-gnu-emacs@gnu.org; Tue, 24 Apr 2007 10:19:38 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HgLrj-0005ZE-Sk for help-gnu-emacs@gnu.org; Tue, 24 Apr 2007 10:19:35 -0400 Original-Received: from ug-out-1314.google.com ([66.249.92.173]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HgLmD-00042h-7n for help-gnu-emacs@gnu.org; Tue, 24 Apr 2007 10:13:53 -0400 Original-Received: by ug-out-1314.google.com with SMTP id j3so185962ugf for ; Tue, 24 Apr 2007 07:13:52 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:content-type:content-transfer-encoding; b=pjGCbgXOIi+EPEm83NS5HL+bXDqfIqOJu4/2hdn94VoadCcK5tgN4h0TNpvmOd+WoYu1MMl2uUTcRi/9W1WtV4l+nF77xhCjG6lpLVgA6WNZPpOJxl9deD7BZAjja7nSzpl2Rpt5tnyxtmo9pzlY5HaGeAfYNPQlNClXL8p6qII= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:subject:content-type:content-transfer-encoding; b=ZxmVC7FOPSx5C4/N5vqsDx2cFDpDls7FCR857+PBUcCb0kl6SC5iez7+mHVYWB70VQ4j1uJz2r2bC8ryuyakD8FJ9WfF4CxgN6LnNemSTXbR9dIFEd3YQlhjHiQpM8KZy658nXFfGUDR3ZRW26oLjoypsueRBQyxYFysTzNpOsM= Original-Received: by 10.67.115.14 with SMTP id s14mr628693ugm.1177424032332; Tue, 24 Apr 2007 07:13:52 -0700 (PDT) Original-Received: from ?10.1.25.2? ( [193.52.94.40]) by mx.google.com with ESMTP id e23sm1452590ugd.2007.04.24.07.13.51; Tue, 24 Apr 2007 07:13:52 -0700 (PDT) User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) X-detected-kernel: Linux 2.4-2.6 (Google crawlbot) 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:43086 gmane.emacs.devel:69939 Archived-At: Thanks for your answer, it perfectly works too! I didn't know the "progn" trick... Now, I would like the function to indent the whole paragraph like the first line. I tried to write this (this is *exactly* what I wrote) : (defun justifier () ;; i am french, so justify becomes justifier (interactive) (save-excursion (let ((from (progn (backward-paragraph -1) (beginning-of-line-text) (point))) (column (current-column)) (to (progn (forward-paragraph -1) (point)))) (indent-region from to column) (fill-region-as-paragraph from to)))) it doesn't work with the first line's indent, though it aligns the paragraph with the second line indent : * try and change the first line's indent, and execute the function, it shouldn't work as I wish. * then try to change the second line's indent (no matter the first line's indent), and the paragraph should align like it. does anyone have a clue? thanks, Yohann.