diff options
| author | Roland McGrath | 1992-09-27 01:31:15 +0000 |
|---|---|---|
| committer | Roland McGrath | 1992-09-27 01:31:15 +0000 |
| commit | f35ecf8813348d04ed7ea618e261c99686fcb1aa (patch) | |
| tree | 1077b0f726563c6d574dd1bd19dab83003d7952a | |
| parent | a0f81711337479b2a01a9c71508c1f9b402f55a9 (diff) | |
| download | emacs-f35ecf8813348d04ed7ea618e261c99686fcb1aa.tar.gz emacs-f35ecf8813348d04ed7ea618e261c99686fcb1aa.zip | |
(vc-update-change-log): Use shell-command, not shell-command-on-region.
Take optional args to pass to script.
Add fancy interactive spec: C-u for current file only; M-0 for all visited.
| -rw-r--r-- | lisp/vc.el | 44 |
1 files changed, 27 insertions, 17 deletions
diff --git a/lisp/vc.el b/lisp/vc.el index 0fae44efd04..3c1a3554f67 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Eric S. Raymond <esr@snark.thyrsus.com> | 5 | ;; Author: Eric S. Raymond <esr@snark.thyrsus.com> |
| 6 | ;; Version: 4.0 | 6 | ;; Version: 4.0 |
| 7 | 7 | ||
| 8 | ;; $Id: vc.el,v 1.58 1992/07/31 07:17:21 esr Exp $ | 8 | ;; $Id: vc.el,v 1.3 1992/08/08 22:58:39 rms Exp roland $ |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
| @@ -758,22 +758,32 @@ to that version." | |||
| 758 | ) | 758 | ) |
| 759 | 759 | ||
| 760 | ;;;###autoload | 760 | ;;;###autoload |
| 761 | (defun vc-update-change-log () | 761 | (defun vc-update-change-log (&rest args) |
| 762 | "Find change log file and add entries from recent RCS logs." | 762 | "Find change log file and add entries from recent RCS logs. |
| 763 | (interactive) | 763 | The mark is left at the end of the text prepended to the change log. |
| 764 | (find-file-other-window "ChangeLog") | 764 | With prefix arg of C-u, only find log entries for the current buffer's file. |
| 765 | (vc-buffer-sync) | 765 | With any numeric prefix arg, find log entries for all files currently visited. |
| 766 | (or (eq major-mode 'indented-text-mode) | 766 | From a program, any arguments are passed to the `rcs2log' script." |
| 767 | (progn | 767 | (interactive (cond ((consp current-prefix-arg) ;C-u |
| 768 | (indented-text-mode) | 768 | (list buffer-file-name)) |
| 769 | (setq left-margin 8) | 769 | (current-prefix-arg ;Numeric argument. |
| 770 | (setq fill-column 74))) | 770 | (let ((files nil) |
| 771 | (auto-fill-mode 1) | 771 | (buffers (buffer-list)) |
| 772 | (undo-boundary) | 772 | file) |
| 773 | (goto-char (point-min)) | 773 | (while buffers |
| 774 | (message "Computing change log entries...") | 774 | (setq file (buffer-file-name (car buffers))) |
| 775 | (shell-command-on-region (point) (point) "rcs2log" t) | 775 | (and file |
| 776 | (message "Computing change log entries... done")) | 776 | (setq file (vc-name file)) |
| 777 | (setq files (cons file files))) | ||
| 778 | (setq buffers (cdr buffers))) | ||
| 779 | files)))) | ||
| 780 | (find-file-other-window "ChangeLog") | ||
| 781 | (vc-buffer-sync) | ||
| 782 | (undo-boundary) | ||
| 783 | (goto-char (point-min)) | ||
| 784 | (message "Computing change log entries...") | ||
| 785 | (shell-command (mapconcat 'identity (cons "rcs2log" args) " ") t) | ||
| 786 | (message "Computing change log entries... done")) | ||
| 777 | 787 | ||
| 778 | ;; Functions for querying the master and lock files. | 788 | ;; Functions for querying the master and lock files. |
| 779 | 789 | ||