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

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

Re: Configuring fill-paragraph not to mash the subversion delimiter?


From: Petter Gustad
Subject: Re: Configuring fill-paragraph not to mash the subversion delimiter?
Date: 20 Mar 2007 20:48:40 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Adam Funk <a24061@yahoo.com> writes:

> Is there any easy way to set something in my ~/.emacs file so that
> when I'm editing subversion commit messages and I use M-q to tidy up a
> few lines of text, the fill-paragraph command will treat the standard
> line 
> 
> --This line, and those below, will be ignored--
> 
> as not being part of the paragraph, even if there is no blank line
> before it?

You could use a function like this:

(defun subversion-fill-paragraph ()
  "like fill-paragraph but only for region from start of buffer to the
subversion mark"
  (interactive)
  (let ((svn-string "--This line, and those below, will be ignored--")
        (prevpoint (point))
        (svn-point))
    (goto-char (point-min))
    (setf svn-point (search-forward svn-string))
    (when svn-point
      (fill-region (point-min) (- svn-point (length svn-string) 1)))
    (goto-char prevpoint)))


But I would suggest that you use subversion from within emacs (much
easier) presumably svn-status (somewhat like dired) where you can
check-in (by the c command) and type the string in a buffer followed
by C-c C-c, or even use the vc- commands (c-x v v) to check in single
files.

Petter

-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?


reply via email to

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