diff options
| author | Roland McGrath | 1993-07-19 01:01:17 +0000 |
|---|---|---|
| committer | Roland McGrath | 1993-07-19 01:01:17 +0000 |
| commit | 43cea1ab616300f217456be62375e8f59dc53015 (patch) | |
| tree | 931a624b096b3bd0ee5e8111d0648742b558bf26 | |
| parent | 287d149f6d009937eac880973c64f035908a002e (diff) | |
| download | emacs-43cea1ab616300f217456be62375e8f59dc53015.tar.gz emacs-43cea1ab616300f217456be62375e8f59dc53015.zip | |
(vc-comment-to-change-log): Copy interactive spec from
add-change-log-entry-other-window. Call add-change-log-entry instead of
add-change-log-entry-other-window; pass it t for OTHER-WINDOW and NEW-ENTRY
args. Go to bol before filling.
| -rw-r--r-- | lisp/vc.el | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/vc.el b/lisp/vc.el index 82dabf60c10..9265c60bcbd 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -589,22 +589,21 @@ popped up to accept a comment." | |||
| 589 | Optional arg (interactive prefix) non-nil means prompt for user name and site. | 589 | Optional arg (interactive prefix) non-nil means prompt for user name and site. |
| 590 | Second arg is file name of change log. \ | 590 | Second arg is file name of change log. \ |
| 591 | If nil, uses `change-log-default-name'." | 591 | If nil, uses `change-log-default-name'." |
| 592 | (interactive) | 592 | (interactive (if current-prefix-arg |
| 593 | (list current-prefix-arg | ||
| 594 | (prompt-for-change-log-name)))) | ||
| 593 | (let (;; Extract the comment first so we get any error before doing anything. | 595 | (let (;; Extract the comment first so we get any error before doing anything. |
| 594 | (comment (ring-ref vc-comment-ring 0)) | 596 | (comment (ring-ref vc-comment-ring 0)) |
| 595 | ;; Don't let add-change-log-entry insert anything but the file name. | 597 | ;; Don't let add-change-log-entry insert a defun name. |
| 596 | (add-log-current-defun-function 'ignore) | 598 | (add-log-current-defun-function 'ignore) |
| 597 | end) | 599 | end) |
| 598 | ;; Call add-log to do half the work. | 600 | ;; Call add-log to do half the work. |
| 599 | (if (interactive-p) | 601 | (add-change-log-entry whoami file-name t t) |
| 600 | ;; This is better than repeating its interactive spec here. | ||
| 601 | (call-interactively 'add-change-log-entry-other-window) | ||
| 602 | (add-change-log-entry-other-window whoami file-name)) | ||
| 603 | ;; Insert the VC comment, leaving point before it. | 602 | ;; Insert the VC comment, leaving point before it. |
| 604 | (setq end (save-excursion (insert comment) (point-marker))) | 603 | (setq end (save-excursion (insert comment) (point-marker))) |
| 605 | (if (looking-at "\\s *\\s(") | 604 | (if (looking-at "\\s *\\s(") |
| 606 | ;; It starts with an open-paren, as in "(foo): Frobbed." | 605 | ;; It starts with an open-paren, as in "(foo): Frobbed." |
| 607 | ;; So remove the ": " add-change-log-entry-other-window inserted. | 606 | ;; So remove the ": " add-log inserted. |
| 608 | (delete-char -2)) | 607 | (delete-char -2)) |
| 609 | ;; Canonicalize the white space between the file name and comment. | 608 | ;; Canonicalize the white space between the file name and comment. |
| 610 | (just-one-space) | 609 | (just-one-space) |
| @@ -618,6 +617,7 @@ If nil, uses `change-log-default-name'." | |||
| 618 | ;; Fill the inserted text, preserving open-parens at bol. | 617 | ;; Fill the inserted text, preserving open-parens at bol. |
| 619 | (let ((paragraph-separate (concat paragraph-separate "\\|^\\s *\\s(")) | 618 | (let ((paragraph-separate (concat paragraph-separate "\\|^\\s *\\s(")) |
| 620 | (paragraph-start (concat paragraph-start "\\|^\\s *\\s("))) | 619 | (paragraph-start (concat paragraph-start "\\|^\\s *\\s("))) |
| 620 | (beginning-of-line) | ||
| 621 | (fill-region (point) end)) | 621 | (fill-region (point) end)) |
| 622 | ;; Canonicalize the white space at the end of the entry so it is | 622 | ;; Canonicalize the white space at the end of the entry so it is |
| 623 | ;; separated from the next entry by a single blank line. | 623 | ;; separated from the next entry by a single blank line. |