diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2000-05-26 12:33:25 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2000-05-26 12:33:25 +0000 |
commit | dc29aa6cbf0f461104e3891aff2e6b4509ac5414 (patch) | |
tree | 21aa6158d961df109a9589a643e8f61a53cda37f /lisp/add-log.el | |
parent | 4370a375b2f3dd2574c3c396cf9266dc706ff3a7 (diff) | |
download | emacs-dc29aa6cbf0f461104e3891aff2e6b4509ac5414.tar.gz |
(add-change-log-entry): Merge the current entry with the
previous one if the previous one is empty.
Diffstat (limited to 'lisp/add-log.el')
-rw-r--r-- | lisp/add-log.el | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lisp/add-log.el b/lisp/add-log.el index a89cbd49f6d..aeb9fb48e10 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el @@ -449,7 +449,20 @@ non-nil, otherwise in local time." (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. |