diff options
author | Eric S. Raymond <esr@snark.thyrsus.com> | 2007-12-27 11:26:27 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@snark.thyrsus.com> | 2007-12-27 11:26:27 +0000 |
commit | 9b64a7f0cf4d2fb716182d26046f645ec58210b3 (patch) | |
tree | 85caeda743cf28835e983261d5088e562c95d05f /lisp/log-view.el | |
parent | 86c3a9fbd94ebdd7c4c8ddc2e671290327eefe2c (diff) | |
download | emacs-9b64a7f0cf4d2fb716182d26046f645ec58210b3.tar.gz |
* (vc.el, vc-sccs.el, vc-rcs.el, vc-cs.el, vc-mcvs.el): Put
machinery in place to support editing of change comments
with 'e' in a log-view buffer. Not documented yet as this
only works for SCCS, RCS, and maybe CVS if you have admin
privileges. When we have backend support for Subversion and
more modern systems it will ve time to write this up.
Diffstat (limited to 'lisp/log-view.el')
-rw-r--r-- | lisp/log-view.el | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/lisp/log-view.el b/lisp/log-view.el index ceda42eb687..d14b33262cc 100644 --- a/lisp/log-view.el +++ b/lisp/log-view.el @@ -128,7 +128,7 @@ '(("q" . quit-window) ("z" . kill-this-buffer) ("m" . log-view-toggle-mark-entry) - ;; ("e" . cvs-mode-edit-log) + ("e" . log-view-modify-change-comment) ("d" . log-view-diff) ("a" . log-view-annotate-version) ("f" . log-view-find-revision) @@ -411,6 +411,31 @@ log entries." (switch-to-buffer (vc-find-revision (log-view-current-file) (log-view-current-tag))))) + +(defun log-view-extract-comment () + "Parse comment from around the current point in the log." + (save-excursion + (let (st en (backend (vc-backend (log-view-current-file)))) + (log-view-end-of-defun) + (cond ((eq backend 'SVN) + (forward-line -1))) + (setq en (point)) + (log-view-beginning-of-defun) + (cond ((memq backend '(SCCS RCS CVS MCVS SVN)) + (forward-line 2)) + ((eq backend 'Hg) + (forward-line 4) + (re-search-forward "summary: *" nil t))) + (setq st (point)) + (buffer-substring st en)))) + +(defun log-view-modify-change-comment () + "Edit the change comment displayed at point." + (interactive) + (vc-modify-change-comment (list (log-view-current-file)) + (log-view-current-tag) + (log-view-extract-comment))) + (defun log-view-annotate-version (pos) "Annotate the version at point." (interactive "d") |