--This line, and those below, will be ignored--
as not being part of the paragraph, even if there is no blank line
before it?
Adjusting `paragraph-start' and/or `paragraph-separate' should be
enough.
David
What package are you using, psvn?
Try:
(add-hook 'svn-log-edit-mode-hook
(lambda ()
(setq paragraph-start (concat "\\(" paragraph-start "\\|--This
line, and those below, will be ignored--\\)"))))
It's getting duplicated for some reason, but that shouldn't affect the
functionality at all...
Matt Flaschen
> What package are you using, psvn?
> (add-hook 'svn-log-edit-mode-hook
> (lambda ()
> (setq paragraph-start (concat "\\(" paragraph-start "\\|--This
> line, and those below, will be ignored--\\)"))))
Actually, it's paragraph-separate that should be changed (otherwise some
words from subsequent lines could be yanked to the end of the "-- ... --"
line). Also the \\(..\\) is unnecessary because the \| operator has the
lowest precedence already, tho this doesn't make much difference.
(add-hook 'svn-log-edit-mode-hook
(lambda ()
(set (make-local-variable 'paragraph-separate)
(concat paragraph-separate
"\\|--This line, and those below, will be ignored--"))))
-- Stefan
> Adam Funk wrote:
>> 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
>
> What package are you using, psvn?
Nothing, as far as I know. I use the svn command from the shell and
EDITOR='emacs -nw' --- Emacs comes up with the commit message in
Fundamental mode.
Okay, then just add this to .emacs. It's necessary to set both start
and separate (separate alone doesn't work):
(setq paragraph-start (concat paragraph-start "\\|--This line, and those
below, will be ignored--"))
(setq paragraph-separate (concat paragraph-separate "\\|--This line, and
those below, will be ignored--"))
Matthew Flaschen
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?
> Okay, then just add this to .emacs. It's necessary to set both start
> and separate (separate alone doesn't work):
It's simple and it works.
Thanks!
Methinks customizing paragraph-separate may prove fruitful. Something like:
(setq paragraph-separate (concat "--.*\?--\\|" paragraph-separate))
I don't know what *-hook variable is run for subversion commit messages. If
you find the right hook, just place the above code in a lambda or defun for it.
--
Sam Peterson
skpeterson At nospam ucdavis.edu
"if programmers were paid to remove code instead of adding it,
software would be much better" -- unknown
> Methinks customizing paragraph-separate may prove fruitful. Something like:
>
> (setq paragraph-separate (concat "--.*\?--\\|" paragraph-separate))
>
> I don't know what *-hook variable is run for subversion commit messages. If
> you find the right hook, just place the above code in a lambda or defun for it.
Thanks, but Matthew Flaschen already gave me the simple answer [1]; I
put these lines in my ~/.emacs and that solved it:
(setq paragraph-start (concat paragraph-start "\\|--This line, and those below, will be ignored--"))
(setq paragraph-separate (concat paragraph-separate "\\|--This line, and those below, will be ignored--"))
[1] Message-ID: <mailman.1142.11743488...@gnu.org>