I wrote this if anyone is interested. It generates skeleton ChangeLog
entries for all changes in a patch file.
andy
(defun add-patch-changelog-entries ()
"Generate template ChangeLog entries for patches in the current-buffer.
This assumes you have used `cvs diff -u' to generate the patch."
(interactive)
(goto-char (point-min))
(let (file pos)
(while (re-search-forward
"\\(^\\+\\+\\+ \\([-_.A-z0-9/]+\\)[ \t]*\\)\\|\\(^@@ -[0-9,]+
\\+\\([0-9]+\\),\\([0-9]+\\)\\)" nil t)
(when (match-beginning 2)
(setq file (buffer-substring (match-beginning 2) (match-end 2)))
(re-search-forward
"\\(^\\+\\+\\+ \\([-_.A-z0-9/]+\\)[ \t]*\\)\\|\\(^@@ -[0-9,]+
\\+\\([0-9]+\\),\\([0-9]+\\)\\)" nil t))
(setq pos (+ (string-to-int (buffer-substring (match-beginning 4)
(match-end 4)))
(/ (string-to-int (buffer-substring (match-beginning 5) (match-end
5))) 2)))
(save-excursion
(find-file file)
(goto-line pos)
(add-change-log-entry))
)))
--------------------------------------------------------------
Dr Andy Piper
Senior Consultant Architect, BEA Systems Ltd