changeset 29243:e5643646a988

(add-change-log-entry): Merge the current entry with the previous one if the previous one is empty.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 26 May 2000 12:32:56 +0000
parents 7dbdb696fd23
children c0069fc0ba7c
files lisp/add-log.el
diffstat 1 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/add-log.el	Fri May 26 11:06:05 2000 +0000
+++ b/lisp/add-log.el	Fri May 26 12:32:56 2000 +0000
@@ -449,7 +449,20 @@
 		    (beginning-of-line 1)
 		    (looking-at "\\s *$"))
 	    (insert ?\ ))
-	  (insert "(" defun "): ")
+	  ;; See if the prev function name has a message yet or not
+	  ;; If not, merge the two entries.
+	  (let ((pos (point-marker)))
+	    (if (and (skip-syntax-backward " ")
+		     (skip-chars-backward "):")
+		     (looking-at "):")
+		     (progn (delete-region (+ 1 (point)) (+ 2 (point))) t)
+		     (> fill-column (+ (current-column) (length defun) 3)))
+		(progn (delete-region (point) pos)
+		       (insert ", "))
+	      (goto-char pos)
+	      (insert "("))
+	    (set-marker pos nil))
+	  (insert defun "): ")
 	  (if version
 	      (insert version ?\ )))
       ;; No function name, so put in a colon unless we have just a star.