Mercurial > emacs
comparison lisp/vc.el @ 1226:573df03a54d8
(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.
author | Roland McGrath <roland@gnu.org> |
---|---|
date | Sun, 27 Sep 1992 01:31:15 +0000 |
parents | ba6a993500d4 |
children | d07030650283 |
comparison
equal
deleted
inserted
replaced
1225:e16f52a7c9f9 | 1226:573df03a54d8 |
---|---|
3 ;; Copyright (C) 1992 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1992 Free Software Foundation, Inc. |
4 | 4 |
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 |
12 ;; GNU Emacs is free software; you can redistribute it and/or modify | 12 ;; GNU Emacs is free software; you can redistribute it and/or modify |
13 ;; it under the terms of the GNU General Public License as published by | 13 ;; it under the terms of the GNU General Public License as published by |
756 (vc-record-rename old new) | 756 (vc-record-rename old new) |
757 nil) | 757 nil) |
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 |
780 (defun match-substring (bn) | 790 (defun match-substring (bn) |
781 (buffer-substring (match-beginning bn) (match-end bn))) | 791 (buffer-substring (match-beginning bn) (match-end bn))) |