Please change the Subject header to a concise description of your patch. Please describe your patch between the LOG-START and LOG-END markers: <<LOG-START>> * lisp/dvc-log.el (dvc-log-edit-mode): Set fill-paragraph-function to dvc-log-fill-paragraph. (dvc-log-fill-paragraph): New function copied from add-log-fill-paragraph in add-log.el which ensures that entries like "(function-name): Description" are filled correctly. (dvc-add-log-entry-internal): Handle edge case where there is no newline at the end of the buffer. Instead of throwing an error, it moves to the end of the paragraph and makes a newline. <<LOG-END>>
[VERSION] dvc-dev-bzr Bazaar (bzr) 0.15.0 Emacs : GNU Emacs 22.0.99.1 (i386-pc-linux-gnu, GTK+ Version 2.6.4) of 2007-05-01 on pacem, modified by Debian -- Michael Olson -- FSF Associate Member #652 -- http://www.mwolson.org/ Interests: Emacs Lisp, text markup, protocols -- Jabber: mwolson_at_hcoop.net /` |\ | | | Projects: Emacs, Muse, ERC, EMMS, Planner, ErBot, DVC |_] | \| |_| Reclaim your digital rights by eliminating DRM. See http://www.defectivebydesign.org/what_is_drm for details.
=== modified file 'lisp/dvc-log.el'
--- lisp/dvc-log.el 2007-03-21 20:49:18 +0000
+++ lisp/dvc-log.el 2007-05-16 15:13:32 +0000
@@ -67,6 +67,8 @@
(dvc-install-buffer-menu)
(set (make-local-variable 'font-lock-defaults)
'(dvc-log-edit-font-lock-keywords t))
+ (set (make-local-variable 'fill-paragraph-function)
+ 'dvc-log-fill-paragraph)
(setq fill-column 73)
(when (eq (point-min) (point-max))
(dvc-log-edit-insert-initial-commit-message))
@@ -136,6 +138,16 @@
(goto-char (point-min))
(flush-lines (concat "^" dvc-log-edit-flush-prefix))))
+(defun dvc-log-fill-paragraph (&optional justify)
+ "Fill the paragraph, but preserve open parentheses at beginning of lines.
+Prefix arg means justify as well."
+ (interactive "P")
+ (let ((end (progn (forward-paragraph) (point)))
+ (beg (progn (backward-paragraph) (point)))
+ (paragraph-start (concat paragraph-start "\\|\\s *\\s(")))
+ (fill-region beg end justify)
+ t))
+
(defun dvc-log-insert-commit-file-list (arg)
"Insert the file list that will be committed.
With a negative prefix argument just remove the file list
@@ -247,8 +259,10 @@
"\\(\\s \\|[(),:]\\)")
bound t))
;; Add to the existing entry for the same file.
- (re-search-forward "^\\s *$\\|^\\s \\*")
- (goto-char (match-beginning 0))
+ (if (re-search-forward "^\\s *$\\|^\\s \\*" nil t)
+ (goto-char (match-beginning 0))
+ (goto-char (point-max))
+ (insert-char ?\n 1))
;; Delete excess empty lines; make just 2.
(while (and (not (eobp)) (looking-at "^\\s *$"))
(delete-region (point) (line-beginning-position 2)))
pgpuGOvFQPeTe.pgp
Description: PGP signature
_______________________________________________ Dvc-dev mailing list [email protected] https://mail.gna.org/listinfo/dvc-dev
