[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: paragraph fill and wrong number of arguments

From: Yohann Pitrey
Subject: Re: paragraph fill and wrong number of arguments
Date: Tue, 24 Apr 2007 16:14:35 +0200
User-agent: Thunderbird (Windows/20070221)

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
           (let ((from (progn
                         (backward-paragraph -1)
                 (column (current-column))
                 (to   (progn
                         (forward-paragraph -1)
             (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?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]