diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2000-06-02 02:28:39 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2000-06-02 02:28:39 +0000 |
commit | 1be77002377c20f88ca33fdc2c990d5ed35e02a8 (patch) | |
tree | cad9d82c1f85459f2f6f3f6d754b9e3bc769e585 /lisp/log-edit.el | |
parent | c5def0db86105ac657a6df9eeb9df5b8452adf03 (diff) | |
download | emacs-1be77002377c20f88ca33fdc2c990d5ed35e02a8.tar.gz |
(log-edit-mode): Make vc-comment-ring-index local.
(log-edit-done): Only add the comment to the ring if it's different
from the last comment entered.
Diffstat (limited to 'lisp/log-edit.el')
-rw-r--r-- | lisp/log-edit.el | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/log-edit.el b/lisp/log-edit.el index baba75e08c5..8f9d28326e0 100644 --- a/lisp/log-edit.el +++ b/lisp/log-edit.el @@ -5,7 +5,7 @@ ;; Author: Stefan Monnier <monnier@cs.yale.edu> ;; Keywords: pcl-cvs cvs commit log ;; Version: $Name: $ -;; Revision: $Id: log-edit.el,v 1.4 2000/05/10 22:20:51 monnier Exp $ +;; Revision: $Id: log-edit.el,v 1.5 2000/05/21 02:13:26 monnier Exp $ ;; This file is part of GNU Emacs. @@ -28,10 +28,8 @@ ;; Todo: -;; - Remove a single leading `* <file>' in log-edit-insert-changelog ;; - Move in VC's code ;; - Add compatibility for VC's hook variables -;; - add compatibility with cvs-edit.el ;;; Code: @@ -177,7 +175,8 @@ Several other handy support commands are provided of course and the package from which this is used might also provide additional commands (under C-x v for VC, for example). -\\{log-edit-mode-map}") +\\{log-edit-mode-map}" + (make-local-variable 'vc-comment-ring-index)) (defun log-edit-hide-buf (&optional buf where) (when (setq buf (get-buffer (or buf log-edit-files-buf))) @@ -205,7 +204,10 @@ If you want to abort the commit, simply delete the buffer." (save-excursion (goto-char (point-max)) (insert ?\n))) - (if (boundp 'vc-comment-ring) (ring-insert vc-comment-ring (buffer-string))) + (let ((comment (buffer-string))) + (when (and (boundp 'vc-comment-ring) (ring-p vc-comment-ring) + (not (equal comment (ring-ref vc-comment-ring 0)))) + (ring-insert vc-comment-ring comment))) (let ((win (get-buffer-window log-edit-files-buf))) (if (and log-edit-confirm (not (and (eq log-edit-confirm 'changed) |