diff options
author | Roland McGrath <roland@gnu.org> | 1993-07-19 01:01:17 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1993-07-19 01:01:17 +0000 |
commit | 9cffc480e263014d78e08e90360940a05e72b0f7 (patch) | |
tree | cca13892d90f70dbe8e9d9729d6b512fb7e5117f /lisp/vc.el | |
parent | c2b906ef541cca92bb56a7999ae0aaa9379c771a (diff) | |
download | emacs-9cffc480e263014d78e08e90360940a05e72b0f7.tar.gz |
(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.
Diffstat (limited to 'lisp/vc.el')
-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." Optional arg (interactive prefix) non-nil means prompt for user name and site. Second arg is file name of change log. \ If nil, uses `change-log-default-name'." - (interactive) + (interactive (if current-prefix-arg + (list current-prefix-arg + (prompt-for-change-log-name)))) (let (;; Extract the comment first so we get any error before doing anything. (comment (ring-ref vc-comment-ring 0)) - ;; Don't let add-change-log-entry insert anything but the file name. + ;; Don't let add-change-log-entry insert a defun name. (add-log-current-defun-function 'ignore) end) ;; Call add-log to do half the work. - (if (interactive-p) - ;; This is better than repeating its interactive spec here. - (call-interactively 'add-change-log-entry-other-window) - (add-change-log-entry-other-window whoami file-name)) + (add-change-log-entry whoami file-name t t) ;; Insert the VC comment, leaving point before it. (setq end (save-excursion (insert comment) (point-marker))) (if (looking-at "\\s *\\s(") ;; It starts with an open-paren, as in "(foo): Frobbed." - ;; So remove the ": " add-change-log-entry-other-window inserted. + ;; So remove the ": " add-log inserted. (delete-char -2)) ;; Canonicalize the white space between the file name and comment. (just-one-space) @@ -618,6 +617,7 @@ If nil, uses `change-log-default-name'." ;; Fill the inserted text, preserving open-parens at bol. (let ((paragraph-separate (concat paragraph-separate "\\|^\\s *\\s(")) (paragraph-start (concat paragraph-start "\\|^\\s *\\s("))) + (beginning-of-line) (fill-region (point) end)) ;; Canonicalize the white space at the end of the entry so it is ;; separated from the next entry by a single blank line. |