Mercurial > emacs
comparison lisp/vc.el @ 86908:6e9e38d61817
* log-edit.el (log-edit-show-diff): New function.
(log-edit-mode-map, log-edit-menu): Bind it.
(log-edit-diff-function): New variable.
(log-edit): Change the 3rd param to be an alist and accept a
function that computes a diff for the files involved.
* vc.el (vc-log-edit): Add a diff function parameter to log-edit.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Sat, 01 Dec 2007 19:37:20 +0000 |
parents | 2c08ad76fc1f |
children | f358a2fd5895 53108e6cea98 |
comparison
equal
deleted
inserted
replaced
86907:0f135bf21932 | 86908:6e9e38d61817 |
---|---|
81 ;; | 81 ;; |
82 ;; Proper function of the SCCS diff commands requires the shellscript vcdiff | 82 ;; Proper function of the SCCS diff commands requires the shellscript vcdiff |
83 ;; to be installed somewhere on Emacs's path for executables. | 83 ;; to be installed somewhere on Emacs's path for executables. |
84 ;; | 84 ;; |
85 ;; If your site uses the ChangeLog convention supported by Emacs, the | 85 ;; If your site uses the ChangeLog convention supported by Emacs, the |
86 ;; function log-edit-comment-to-change-log could prove a useful checkin hook, | 86 ;; function `log-edit-comment-to-change-log' could prove a useful checkin hook, |
87 ;; although you might prefer to use C-c C-a (i.e. log-edit-insert-changelog) | 87 ;; although you might prefer to use C-c C-a (i.e. `log-edit-insert-changelog') |
88 ;; from the commit buffer instead or to set `log-edit-setup-invert'. | 88 ;; from the commit buffer instead or to set `log-edit-setup-invert'. |
89 ;; | 89 ;; |
90 ;; The vc code maintains some internal state in order to reduce expensive | 90 ;; The vc code maintains some internal state in order to reduce expensive |
91 ;; version-control operations to a minimum. Some names are only computed | 91 ;; version-control operations to a minimum. Some names are only computed |
92 ;; once. If you perform version control operations with the backend while | 92 ;; once. If you perform version control operations with the backend while |
3575 | 3575 |
3576 (defun vc-log-edit (fileset) | 3576 (defun vc-log-edit (fileset) |
3577 "Set up `log-edit' for use with VC on FILE." | 3577 "Set up `log-edit' for use with VC on FILE." |
3578 (setq default-directory | 3578 (setq default-directory |
3579 (with-current-buffer vc-parent-buffer default-directory)) | 3579 (with-current-buffer vc-parent-buffer default-directory)) |
3580 (log-edit 'vc-finish-logentry nil `(lambda () ',fileset)) | 3580 (log-edit 'vc-finish-logentry |
3581 nil | |
3582 `((log-edit-listfun . (lambda () ',fileset)) | |
3583 (log-edit-diff-function . (lambda () (vc-diff nil))))) | |
3581 (set (make-local-variable 'vc-log-fileset) fileset) | 3584 (set (make-local-variable 'vc-log-fileset) fileset) |
3582 (make-local-variable 'vc-log-revision) | 3585 (make-local-variable 'vc-log-revision) |
3583 (set-buffer-modified-p nil) | 3586 (set-buffer-modified-p nil) |
3584 (setq buffer-file-name nil)) | 3587 (setq buffer-file-name nil)) |
3585 | 3588 |