[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX] treating a multitude of paragraphs
From: |
Andreas Roehler |
Subject: |
Re: [AUCTeX] treating a multitude of paragraphs |
Date: |
Sun, 08 Apr 2007 21:36:42 +0200 |
User-agent: |
Thunderbird 1.5.0.4 (X11/20060516) |
Sorry, it seems I didn't sent the last draft.
Meanwhile it's written different:
(setq long-quote-start "\\begin{quote}")
(setq long-quote-end "\\end{quote}")
(defun tx-quote-paragraphs-2 (beg end)
"Quotes paragraphs in region"
(interactive "*r")
(narrow-to-region beg end)
(point-min-marker)
(point-max-marker)
(goto-char beg)
(while (< (point) (point-max-marker))
(insert long-quote-start)
(newline)
(LaTeX-forward-paragraph)
(insert long-quote-end)
(newline)
(skip-chars-forward " \t\r\n\f"))
(widen))
(defun tx-quote-paragraphs (&optional arg beg end)
"Operates on region, when active.
With arg from point-min, default is from current pos "
(interactive "*P")
(let ((beg (if beg beg
(cond ((and mark-active transient-mark-mode)
(region-beginning))
((when arg (point-min)))
(t (point)))))
(end (if end end
(cond ((and mark-active transient-mark-mode)
(1+ (region-end)))
(t (point-max))))))
(narrow-to-region beg end)
(point-min-marker)
(point-max-marker)
(goto-char beg)
(while (< (point) (point-max-marker))
(insert long-quote-start)
(newline)
(LaTeX-forward-paragraph)
(insert long-quote-end)
(newline)
(skip-chars-forward " \t\r\n\f"))
(widen)))
Andreas Roehler