help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: forward-paragraph, paragraph-start trouble


From: Andreas Röhler
Subject: Re: forward-paragraph, paragraph-start trouble
Date: Mon, 7 Apr 2008 16:32:03 +0200
User-agent: KMail/1.9.5

Am Sonntag, 6. April 2008 01:20 schrieb John J Foerch:
>    line to compare the amount of
>     indentation.
>         Crazy though it may seem,
>     this sentence begins a new
>     paragraph.

What about this?

(defun my-paragraph-start (&optional indent this) 
  (interactive)
  (beginning-of-line)
  (or this (setq this (point-min)))
  (when (<= this (point)) 
    (let* ((pos (point)) 
           (this-indent (- (progn (skip-chars-forward " \t")(point))pos))
           (indent (or indent
                       this-indent)))
      (unless
          (< indent this-indent)
        (forward-line 1)
        (my-paragraph-start this-indent (point))))))


Andreas Röhler




reply via email to

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